From: Dessalines Date: Thu, 2 Mar 2023 23:30:38 +0000 (-0500) Subject: Adding 2FA support. Fixes #938 (#939) X-Git-Url: http://these/git/readmes/README.ja.md?a=commitdiff_plain;h=07e7e1eb8762c65ae6b6dfadd5108a94e51992b6;p=lemmy-ui.git Adding 2FA support. Fixes #938 (#939) * Adding 2FA support. Fixes #938 * Updating totp_2fa names. --- diff --git a/package.json b/package.json index 839a3d8..26f10e9 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "inferno-server": "^8.0.6", "isomorphic-cookie": "^1.2.4", "jwt-decode": "^3.1.2", - "lemmy-js-client": "0.17.2-rc.1", + "lemmy-js-client": "0.17.2-rc.3", "markdown-it": "^13.0.1", "markdown-it-container": "^3.0.0", "markdown-it-footnote": "^3.0.3", diff --git a/src/shared/components/home/login.tsx b/src/shared/components/home/login.tsx index 7cdde92..dea6484 100644 --- a/src/shared/components/home/login.tsx +++ b/src/shared/components/home/login.tsx @@ -26,8 +26,10 @@ interface State { form: { username_or_email?: string; password?: string; + totp_2fa_token?: string; }; loginLoading: boolean; + showTotp: boolean; siteRes: GetSiteResponse; } @@ -38,6 +40,7 @@ export class Login extends Component { state: State = { form: {}, loginLoading: false, + showTotp: false, siteRes: this.isoData.site_res, }; @@ -141,6 +144,28 @@ export class Login extends Component { + {this.state.showTotp && ( +
+ +
+ +
+
+ )}
+ {this.totpSection()}