mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
[auth0-js] Add passwordlessLogin to WebAuth for auth0 v9 (#31532)
* add passwordlessLogin to WebAuth * remove trailing whitespaces from auth0.WebAuth * Re-arrange the order of the PasswordlessLoginOptions properties to match the declaration in auth0
This commit is contained in:
parent
f56373cd3e
commit
2c11ef711e
@ -136,6 +136,12 @@ webAuth.passwordlessStart({
|
||||
send: 'code'
|
||||
}, (err, data) => {});
|
||||
|
||||
webAuth.passwordlessLogin({
|
||||
connection: 'the_connection',
|
||||
phoneNumber: '123',
|
||||
verificationCode: '456'
|
||||
}, (err, data) => {});
|
||||
|
||||
webAuth.signupAndAuthorize({
|
||||
connection: 'the_connection',
|
||||
email: 'me@example.com',
|
||||
|
||||
14
types/auth0-js/index.d.ts
vendored
14
types/auth0-js/index.d.ts
vendored
@ -270,6 +270,13 @@ export class WebAuth {
|
||||
*/
|
||||
passwordlessVerify(options: PasswordlessVerifyOptions, callback: Auth0Callback<any>): void;
|
||||
|
||||
/**
|
||||
* Logs in a user with the verification code sent to the user
|
||||
* @param options
|
||||
* @param callback
|
||||
*/
|
||||
passwordlessLogin(options: PasswordlessLoginOptions, callback: Auth0Callback<any>): void;
|
||||
|
||||
/**
|
||||
* Renews an existing session on Auth0's servers using `response_mode=web_message` (i.e. Auth0's hosted login page)
|
||||
*
|
||||
@ -615,6 +622,13 @@ export interface PasswordlessVerifyOptions {
|
||||
send?: string;
|
||||
}
|
||||
|
||||
export interface PasswordlessLoginOptions {
|
||||
connection: string;
|
||||
verificationCode: string;
|
||||
phoneNumber?: string;
|
||||
email?: string;
|
||||
}
|
||||
|
||||
export interface Auth0UserProfile {
|
||||
name: string;
|
||||
nickname: string;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user