Not able to get idToken

We are using swift Auth0 SDK in iOS application to enable users login.

WebAuth login is working fine by returning the user profile saved in user_metadata as custom claims in IDToken.

When we update the profile saved in user_metadata, I’m not able to get the updated idToken by calling Auth0.authentication().renew(withRefreshToken:..) or by calling Auth0.authentication().userInfo()`. IDToken / customclaims is not returned,

Here is the scope that I’m using. “openid profile email read:current_user update:current_user_metadata offline_access”.

Please support me on #2 mentioned above.

Hey there @mohansivaram welcome to the community :slight_smile:

I believe you aren’t receiving the updated ID token because it is still valid at the time of renewal - What happens if you pass an extra parameter of "cacheMode": "off" as outline here?

    .renew(withRefreshToken: credentials.refreshToken) // Returns a Request
    .parameters(["cacheMode": "off"]) 
    .start { result in
        // ...

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