How to get organization parameters in access token - React Native SDK Auth0

  • Which SDK this is regarding:
    React Native Auth0 SDK

  • SDK Version:
    NPM = react-native-auth0
    Version = 2.13.3

  • Code Snippets/Error Messages/Supporting Details/Screenshots:

Hi,

I am integrating Auth0 for Mobile apps using React Native Auth0 SDK, I did integration and all works.

But my token is not included Org params in access token once decoding it.

Code:

auth0.webAuth
      .authorize({
        scope: 'openid profile email offline_access',
        audience: 'https://xyazzzzz.com',
      })

It included org parameter only if I send AuthExternalID - called Organization ID as parameter in authorise call.

Its not possible to get organizationID without authenticating with Auth0 as my platform API’s are required access token to get list of Organizations for particular user.

auth0.webAuth
      .authorize({
        scope: 'openid profile email offline_access',
        audience: 'https://xyazzzzz.com',
        organization: organizationID,
      })

Hello @ashokkumar.kandasamy welcome to the community!

That’s correct that in order to include the org_id in a token, it will need to be included in the authorize call one way or another.

If you feel there is a gap in the Organization feature as is, I definitely recommend scanning through through and opening up a feedback request if you don’t see something similar as we monitor these for community engagement - If there is something you’d like to see I’m sure other community members would as well :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.