[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:
Phebe Sawan 2018-12-21 00:16:17 +08:00 committed by Nathan Shively-Sanders
parent f56373cd3e
commit 2c11ef711e
2 changed files with 20 additions and 0 deletions

View File

@ -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',

View File

@ -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;