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
I am trying to build a very simple web app using FastAPI and Jinja2 templates, but I am really struggling to understand OAuth2. I've followed the official tutorial but if I set my form action to the /token endpoint all I see in my browser is the token itself.
How do I get it to take me to an authenticated page using the token provided by the /token endpoint? Do I set this as a cookie or how do I get the token back to Javascript so I can use it in future calls?
I tried to look at the full stack example but it's so convoluted I struggled to decipher it - plus it uses NodeJS on the front-end which I don't understand.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I am trying to build a very simple web app using FastAPI and Jinja2 templates, but I am really struggling to understand OAuth2. I've followed the official tutorial but if I set my form action to the
/token
endpoint all I see in my browser is the token itself.How do I get it to take me to an authenticated page using the token provided by the
/token
endpoint? Do I set this as a cookie or how do I get the token back to Javascript so I can use it in future calls?I tried to look at the full stack example but it's so convoluted I struggled to decipher it - plus it uses NodeJS on the front-end which I don't understand.
Any help would be much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions