本文整理汇总了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();