-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement current_user functionality #19
Comments
This has been a huge help: https://www.youtube.com/watch?v=6hTRw_HK3Ts |
Add token expiry to the json web token used for UI auth |
This might require an authentication backend to make JWT essentially behave like sessions... so, it's a strange patchwork right now. Eventually, we'll need to tighten the auth scheme up. See here:
Originally posted by @iashraful in fastapi/fastapi#3043 (comment) References |
Extend the starlette simple user Right now, the starlette simple user only stores the username. But, in order to minimize the number of database queries, perhaps we can store a little more - like the user ID and API key... |
This requires us to wrap the User model in sqlalchemy in pydantic, see here: https://fastapi.tiangolo.com/tutorial/security/get-current-user/ and https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/.
Does it make more sense to make the sql data model ALL into pydantic models, and to use these to construct the database tables instead of hard-coding them in
libreforms_fastapi/utils/sqlalchemy_models.py
?The text was updated successfully, but these errors were encountered: