mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
[auth0-js] Add optional usePostMessage for checkSession, fix travis-ci build error
This commit is contained in:
@@ -182,7 +182,14 @@ webAuth.checkSession({
|
||||
// Authentication tokens or error
|
||||
});
|
||||
|
||||
|
||||
webAuth.checkSession({
|
||||
audience: 'https://mystore.com/api/v2',
|
||||
scope: 'read:order write:order',
|
||||
redirectUri: 'https://example.com/auth/silent-callback',
|
||||
usePostMessage: true
|
||||
}, (err, authResult) => {
|
||||
// Renewed tokens or error
|
||||
});
|
||||
|
||||
const authentication = new auth0.Authentication({
|
||||
domain: 'me.auth0.com',
|
||||
|
||||
9
types/auth0-js/index.d.ts
vendored
9
types/auth0-js/index.d.ts
vendored
@@ -275,7 +275,7 @@ export class WebAuth {
|
||||
* @param options options used in {@link authorize} call
|
||||
* @param callback: any(err, token_payload)
|
||||
*/
|
||||
checkSession(options: AuthorizeOptions, callback: Auth0Callback<any>): void;
|
||||
checkSession(options: CheckSessionOptions, callback: Auth0Callback<any>): void;
|
||||
}
|
||||
|
||||
export class Redirect {
|
||||
@@ -761,3 +761,10 @@ export interface AuthorizeOptions {
|
||||
scope?: string;
|
||||
audience?: string;
|
||||
}
|
||||
|
||||
export interface CheckSessionOptions extends AuthorizeOptions {
|
||||
/**
|
||||
* optional parameter for auth0 to use postMessage to communicate between the silent callback and the SPA.
|
||||
*/
|
||||
usePostMessage?: boolean;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user