How to add custom query params in ReactNative Auth0 - /authorize url?

Viewed 151

I need to add additional query parameters &foo=bar to the /authorize URL. Is there a way to achieve this?

const auth0 = new Auth0({
  clientId: 'xxx',
  domain: 'yyy',
});

And the login method looks like this

async loginWithAuth0(): Promise<Credentials | null> {
  try {
    const credentials: Credentials = await auth0.webAuth.authorize({
      scope: 'openid profile email offline_access',
    });
    return credentials;
  } catch (error) {
    console.log('Error with Auth0 Login', error);
    return null;
  }
}

The auth0 library is generating/appending all required query parameters to the /authorize request, need a way to customize and add a few more.

0 Answers
Related