I am not that sure if this is a bug on the side of plugin code or payload, but maybe you will have some hints.
In the plugin code, after successful oAuth I
useAuth hook and then I use
useNavigate to navigate to
What I get is the screen below:
Back to Dashboard works okay, so I am logged in and whole process was successful. However, for some reason the initial redirect kind of recognizes that I am logged in, but still implies that I am trying to do that again.
If you have an idea if this might me my plugin-specific behaviour, or some Payload feature clashing with the hook, I would be very keen to get any type of feedback!
Were you able to figure out what was going on in your plugin? I don't think it is a Payload specific issue.
What you might be up against is that the user object isn't being updated in Payload. There isn't method on the auth provider to do this. I think what typically would happen is that you have a full redirect or page load to update the user coming from the 3rd party auth provider.
I hope that helps!
@DanRibbens , partially - i just workaround it by reloading the page after successful login , which seems to work ok enough.