Hello,
I use @auth0/auth0-react and I would like to display a welcome message (like “Hello user.nickname”) after a login and eventually store welcome=true in localStorage to prevent same message again when reloading the page.
But I can’t find the right event or hook to do something like that.
I tried onRedirectCallback on the Auth0Provider component but I don’t have the context of the user yet.
I tried useEffect hook on user value but I can’t remove welcome=true when the user logout.
Are there any events to do this? Like onLogin/onLogout or something like that ?
Thank you for your answer !
But it is not exactly what I would like to do.
I would like to have a “Welcome user.nickname” on every successful login (on my webapp).
I could easily do that with some onSuccessLogin event on the Auth0Provider component of the @auth0/auth0-react package (but I don’t find this type of event).