For auth0-spa-js
and auth0-react
- any extra options you pass to the SDK will be sent as custom params to the authorization server when redirecting to /authorize
endpoint, eg
const auth0 = await createAuth0Client({
domain: '<AUTH0_DOMAIN>',
client_id: '<AUTH0_CLIENT_ID>',
redirect_uri: '<MY_CALLBACK_URL>',
// Pass custom parameters to login & silent auth
customParam="foo"
});
// Or just for silent auth
auth0.getTokenSilently({ customParam: "foo" })
ReactDOM.render(
<Auth0Provider
domain="YOUR_AUTH0_DOMAIN"
clientId="YOUR_AUTH0_CLIENT_ID"
redirectUri={window.location.origin}
// Pass custom parameters to login & silent auth
customParam="foo"
>
<App />
</Auth0Provider>,
document.getElementById('root')
);
// Or just for silent auth
getAccessTokenSilently({ customParam: "foo" })