本文整理匯總了TypeScript中auth0-js.WebAuth.signupAndAuthorize方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript WebAuth.signupAndAuthorize方法的具體用法?TypeScript WebAuth.signupAndAuthorize怎麽用?TypeScript WebAuth.signupAndAuthorize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類auth0-js.WebAuth
的用法示例。
在下文中一共展示了WebAuth.signupAndAuthorize方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
webAuth.changePassword({connection: 'the_connection',
email: 'me@example.com',
password: '123456'
}, (err) => {});
webAuth.passwordlessStart({
connection: 'the_connection',
email: 'me@example.com',
send: 'code'
}, (err, data) => {});
webAuth.signupAndAuthorize({
connection: 'the_connection',
email: 'me@example.com',
password: '123456',
scope: 'openid',
user_metadata: {
foo: 'bar'
}
}, (err, data) => {});
webAuth.client.login({
realm: 'Username-Password-Authentication', // connection name or HRD domain
username: 'info@auth0.com',
password: 'areallystrongpassword',
audience: 'https://mystore.com/api/v2',
scope: 'read:order write:order',
}, (err, authResult) => {/*Auth tokens in the result or an error*/});
webAuth.popup.buildPopupHandler();
webAuth.popup.preload({});
示例2: function
webAuth.changePassword({connection: 'the_connection',
email: 'me@example.com',
password: '123456'
}, (err) => {});
webAuth.passwordlessStart({
connection: 'the_connection',
email: 'me@example.com',
send: 'code'
}, (err, data) => {});
webAuth.signupAndAuthorize({
connection: 'the_connection',
email: 'me@example.com',
password: '123456',
scope: 'openid'
}, function (err, data) {
});
webAuth.client.login({
realm: 'Username-Password-Authentication', //connection name or HRD domain
username: 'info@auth0.com',
password: 'areallystrongpassword',
audience: 'https://mystore.com/api/v2',
scope: 'read:order write:order',
}, function(err, authResult) {
// Auth tokens in the result or an error
});
webAuth.popup.buildPopupHandler();