You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My authentication on google works when I go on my backend http://localhost:3000/login/google. It does not work through my frontend that performs this redirection: http://localhost:5173/login/google -> http://localhost:3000/login/google.
My backend is running on :3000. Here is my configuration for oauth2 google:
When I open my browser and I go on http://localhost:3000/login/google, everything works fine: my callback controller has err = null.
So now, I have this react project with this simple component:
// http://localhost:5173/login/googleimport{Button}from'../ui/button';exportfunctionLoginButtonGoogle(){consthandleLogin=()=>{window.location.href=`http://localhost:3000/login/google`;};return<ButtononClick={handleLogin}>Login with Google</Button>;}
I'm redirected to the google authentication page. But when it goes back to my callback controller, err = Invalid State.
I don't understand why because it is juste a redirection performed on my frontend page without adding any other parameter.
Do you have any idea?
The text was updated successfully, but these errors were encountered:
TL;DR
My authentication on google works when I go on my backend
http://localhost:3000/login/google
. It does not work through my frontend that performs this redirection:http://localhost:5173/login/google -> http://localhost:3000/login/google
.My backend is running on
:3000
. Here is my configuration for oauth2 google:Here is my callback controller:
When I open my browser and I go on
http://localhost:3000/login/google
, everything works fine: my callback controller haserr = null
.So now, I have this react project with this simple component:
I'm redirected to the google authentication page. But when it goes back to my callback controller,
err = Invalid State
.I don't understand why because it is juste a redirection performed on my frontend page without adding any other parameter.
Do you have any idea?
The text was updated successfully, but these errors were encountered: