Closed danieljfarrell closed 3 years ago
You can use Web storage or cookies to store information.
Maybe I should ask on Stack Overflow, thanks so much for the comment! I’m coming from native Desktop UI background so I’m not too sure where to start!
Thank you for this! 👍
It really helped me to understand the pieces and how you put them together for a web frontend.
I have a question about adding a login page. I have a FastAPI REST API, some of the routes require authentication before use (JWT in the header).
I've added a new route to serve the page
app/routers/login.py
,and template
template/login.html
,When the submit button is clicked, what currently happens is that page refreshes and displays the JSON content of the response,
What I would like to do is save the response and store the header information somewhere so that subsequent calls to the API always send the authentication token. Any pointers on how to do that?