Saving and Refreshing JWT Tokens
When an authentication is performed with the
offline_access SAMLscope included, it will return a Refresh Token that can be used to request a new JWT token and avoid asking the user his/her
First thing we need to do is store the ID Token and Refresh Token in the iOS Keychain after a successful authentication.
Once you have those stored, you can at any point request a new ID Token using either of by calling to Auth0`s delegation endpoint.
Using a non-expired ID Token
Management API v2
Using Refresh Token
Management API v1 - DEPRECATED
Retrieving the user profile from Keychain
If you need to show profile information in your application, just retrieve the saved profile and pick what you need. For example: