Optional appawait auth0.connectAccountWithRedirect({
connection: 'google-oauth2',
appState: { returnTo: '/settings' }
});
Optional authorization_Additional authorization parameters for the request.
await auth0.connectAccountWithRedirect({
connection: 'github',
authorization_params: {
audience: 'https://api.github.com'
}
});
The name of the connection to link (e.g. 'google-oauth2').
Optional openOptional function to handle the redirect URL.
Optional function to handle the redirect URL.
await auth0.connectAccountWithRedirect({
connection: 'google-oauth2',
openUrl: async (url) => { myBrowserApi.open(url); }
});
await auth0.connectAccountWithRedirect({
connection: 'google-oauth2',
openUrl: async (url) => { myBrowserApi.open(url); }
});
Optional redirectThe URI to redirect back to after connecting the account.
Optional scopesArray of scopes to request from the Identity Provider during the connect account flow.
await auth0.connectAccountWithRedirect({
connection: 'google-oauth2',
scopes: ['https://www.googleapis.com/auth/calendar']
});
Optional application state to persist through the transaction.