Open jaswanthm1855 opened 1 year ago
Getting error while redirecting to auth/token
error: mismatching_state: CSRF Warning! State not equal in request and response.
I had the same issue and this suggestion helped me: https://stackoverflow.com/a/73640142/11422689
Change from http to https with mkcert and register the domains in google developer console as follows:
Down below is my /auth endpoint with the latest Authlib==1.1.0
@app.route('/auth')
async def auth(request: Request):
token = await oauth.google.authorize_access_token(request)
user = token.get('userinfo')
if user:
request.session['user'] = user
return RedirectResponse(url='/')
Getting error while redirecting to auth/token
error: mismatching_state: CSRF Warning! State not equal in request and response.