Let's quickly recap the sign-in flow between our app and Auth0:
- Our app redirects to Auth0 to allow the user to enter their credentials.
- After the user has successfully signed in, Auth0 redirects back to our app with a code.
- Our app can then request an access token from Auth0 with the code.
The sign-out flow is as follows:
- Our app redirects to Auth0 to perform the logout.
- A redirect then occurs back to our app.
So, we will have the following routes in our frontend app:
- /signin: Our app will navigate to this page to start the sign-in process. This page will call a method in the Auth0 client, which will redirect to a page in Auth0.
- /signin-callback: This is the page in our app that Auth0 will redirect back to with the code.
- /signout: Our app will navigate to this page to start the sign-out process. This page will call a method in the Auth0 client, which will redirect to a page in Auth0.
- /signout-callback: This is the page in our app that Auth0 will redirect back to after the logout has completed.