Open Jsalaz1989 opened 1 year ago
Thanks for linking to that, it helped me realize that, at least in my case, wrapping the oauth.google.authorize_redirect()
with str
does the trick:
@app.get("/login/google")
async def login_via_google(request: Request):
redirect_uri = request.url_for('auth_via_google')
return await oauth.google.authorize_redirect(request, str(redirect_uri)) # wrap with str()
Thanks for linking to that, it helped me realize that, at least in my case, wrapping the
oauth.google.authorize_redirect()
withstr
does the trick:@app.get("/login/google") async def login_via_google(request: Request): redirect_uri = request.url_for('auth_via_google') return await oauth.google.authorize_redirect(request, str(redirect_uri)) # wrap with str()
adding str work fine
Same issue as this SO user. I'm following the official tutorial / blog post, but I get the following error when it gets to
oauth.google.authorize_redirect()
:Code from tutorial:
The error:
I'm on
fastapi==0.95.0
andAuthlib==1.2.0
.