Add checkSession method to acquire new token from Auth0

This commit is contained in:
Adrian Chia
2017-12-05 16:33:15 -06:00
parent 2ae672d827
commit eb04a7c5cc
2 changed files with 18 additions and 0 deletions

View File

@@ -174,6 +174,16 @@ webAuth.login({username: 'bar', password: 'foo'}, (err, data) => {});
webAuth.crossOriginAuthenticationCallback();
webAuth.checkSession({
audience: 'https://mystore.com/api/v2',
scope: 'read:order write:order',
redirectUri: 'https://example.com/auth/silent-callback'
}, (err, authResult) => {
// Authentication tokens or error
});
const authentication = new auth0.Authentication({
domain: 'me.auth0.com',
clientID: '...',

View File

@@ -268,6 +268,14 @@ export class WebAuth {
* @param options:
*/
passwordlessVerify(options: PasswordlessVerifyOptions, callback: Auth0Callback<any>): void;
/**
* Renews an existing session on Auth0's servers using `response_mode=web_message` (i.e. Auth0's hosted login page)
*
* @param options options used in {@link authorize} call
* @param callback
*/
checkSession(options: AuthorizeOptions, callback: Auth0Callback<any>): void;
}
export class Redirect {