Open ns-ovc opened 2 months ago
Have you tried onSigninCallback
? See https://github.com/authts/react-oidc-context/blob/main/src/AuthProvider.tsx#L42
Have you tried
onSigninCallback
? See https://github.com/authts/react-oidc-context/blob/main/src/AuthProvider.tsx#L42
Thank you for the fast response! How should I use this event? The user is not yet authorized at this time.
The process is:
If I think correctly, I need access to this method via useAuth hook:
Here I can specify my custom URL to log in the user.
If I think correctly, I need access to this method via useAuth hook:
You can register your own function of onSigninCallback
via setttings into the auth context <AuthProvider onSigninCallback={(user) => console.log(user)} ...>
....
I have a website that is also converted into an app via Capacitor. The login on the website works without any problems. But not for the native app. There is a hook for Capacitor when the redirect URL is called from the auth provider.
A URL is returned that contains the code & session_state. I would need to call a function there to handle the URL (not window.location.href). Is there a way to do this?
In auth0-react there is a function called "handleRedirectCallback(url)" that does just that.