Optional
appawait auth0.connectAccountWithRedirect({
connection: 'google-oauth2',
appState: { returnTo: '/settings' }
});
Optional
authorization_Additional authorization parameters for the request.
await auth0.connectAccountWithRedirect({
connection: 'google-oauth2',
authorization_params: {
scope: 'https://www.googleapis.com/auth/calendar'
access_type: 'offline'
}
});
await auth0.connectAccountWithRedirect({
connection: 'github',
authorization_params: {
scope: 'repo user',
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 application state to persist through the transaction.