When a user logs out of the Magento store, the user needs to be logged out of Auth0 as well.
This will be done using the auth0 logout endpoint: https://auth0.com/docs/logout
Sample user flow:
User logs out of Magento store
An observer is implemented for the "after logout" event in Magento. The observer checks for an active auth0 session and logs the user out using the endpoint, passing where the user needs to be redirected to as indicated in the Auth0 docs.
It is important that the observer should not do anything if the just logged out user did not log in using Auth0.
When a user logs out of the Magento store, the user needs to be logged out of Auth0 as well. This will be done using the auth0 logout endpoint: https://auth0.com/docs/logout Sample user flow: