lemmy-js-client 0.17.2-rc.2 → 0.17.2-rc.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,10 @@ import { CommentReplyView, CommentView, CommunityModeratorView, PersonMentionVie
3
3
  export interface Login {
4
4
  username_or_email: string;
5
5
  password: string;
6
- totp_token?: string;
6
+ /**
7
+ * If your user has 2fa set up, they must provide the token, otherwise you will receive the error "missing_totp_token"
8
+ */
9
+ totp_2fa_token?: string;
7
10
  }
8
11
  /**
9
12
  * Register a new user.
@@ -85,7 +88,15 @@ export interface SaveUserSettings {
85
88
  show_read_posts?: boolean;
86
89
  show_new_post_notifs?: boolean;
87
90
  discussion_languages?: number[];
88
- generate_totp?: boolean;
91
+ /**
92
+ * If this is set to true, lemmy will generate or regenerate a 2-factor (totp) authentication secret.
93
+ * You can then use the `totp_2fa_url` from [[LocalUserSettings]] to set up your authenticator app.
94
+ *
95
+ * If this is set to false, it will remove 2-factor for your account.
96
+ *
97
+ * If this is undefined, it leaves your 2-factor setup as is.
98
+ */
99
+ generate_totp_2fa?: boolean;
89
100
  auth: string;
90
101
  }
91
102
  export interface ChangePassword {
@@ -16,7 +16,10 @@ export interface LocalUserSettings {
16
16
  show_new_post_notifs: boolean;
17
17
  email_verified: boolean;
18
18
  accepted_application: boolean;
19
- totp_url?: string;
19
+ /**
20
+ * An installation url for your 2-factor authenticator app.
21
+ */
22
+ totp_2fa_url?: string;
20
23
  }
21
24
  export interface PersonSafe {
22
25
  id: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lemmy-js-client",
3
- "version": "0.17.2-rc.2",
3
+ "version": "0.17.2-rc.3",
4
4
  "description": "A javascript / typescript client for Lemmy",
5
5
  "repository": "https://github.com/LemmyNet/lemmy-js-client",
6
6
  "license": "AGPL-3.0",