How it works

There are certain things that we need to know before digging more into code.

Auth0 uses JWT (JSON Web Token), which is a compact way of sharing information between two parties via JSON. In simple terms, when the user is authenticated, Auth0 sends us JWTs, which have information about the user and also allow the user to access authenticated routes/URLs. Auth0 sends back an access_token, which is required for accessing authenticated routes, and it also sends us an id_token, which contains the user's profile information such as their username, profile picture, and so on. Both of these tokens have a short lifespan and then they expire. But along with that, Auth0 also sends us a refresh_token, which has a long expiry date and can ...

Get Ionic Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.