* Adding TOTP support.

* v0.17.2-rc.2

* Fix name.

* v0.17.2-rc.3
This commit is contained in:
Dessalines 2023-03-02 18:26:44 -05:00 committed by Dessalines
parent 0c25b7cfd2
commit c13af053f0
3 changed files with 18 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "lemmy-js-client", "name": "lemmy-js-client",
"version": "0.17.2-rc.1", "version": "0.17.2-rc.3",
"description": "A javascript / typescript client for Lemmy", "description": "A javascript / typescript client for Lemmy",
"repository": "https://github.com/LemmyNet/lemmy-js-client", "repository": "https://github.com/LemmyNet/lemmy-js-client",
"license": "AGPL-3.0", "license": "AGPL-3.0",

View file

@ -13,6 +13,10 @@ import {
export interface Login { export interface Login {
username_or_email: string; username_or_email: string;
password: string; password: string;
/**
* If your user has 2fa set up, they must provide the token, otherwise you will receive the error "missing_totp_token"
*/
totp_2fa_token?: string;
} }
/** /**
@ -103,6 +107,15 @@ export interface SaveUserSettings {
show_read_posts?: boolean; show_read_posts?: boolean;
show_new_post_notifs?: boolean; show_new_post_notifs?: boolean;
discussion_languages?: number[]; discussion_languages?: number[];
/**
* If this is set to true, lemmy will generate or regenerate a 2-factor (totp) authentication secret.
* You can then use the `totp_2fa_url` from [[LocalUserSettings]] to set up your authenticator app.
*
* If this is set to false, it will remove 2-factor for your account.
*
* If this is undefined, it leaves your 2-factor setup as is.
*/
generate_totp_2fa?: boolean;
auth: string; auth: string;
} }

View file

@ -16,6 +16,10 @@ export interface LocalUserSettings {
show_new_post_notifs: boolean; show_new_post_notifs: boolean;
email_verified: boolean; email_verified: boolean;
accepted_application: boolean; accepted_application: boolean;
/**
* An installation url for your 2-factor authenticator app.
*/
totp_2fa_url?: string;
} }
export interface PersonSafe { export interface PersonSafe {