Skip to content

Conversation

@progGabo
Copy link

Requirements:

  1. JWT Token Management:
    I managed to create token verify it but setting it into HTTP-only cookie was problem on streamlit. It works on FastAPI swagger
    but for some reason it does not work on streamlit and I did not figured it out. I tried CookieManager from
    streamlit_cookies_manager but it did not worked as it should. I also tried fastapi-jwt-auth but there was problem
    because it is using Pydantic V1 not V2. So for now I am storing access token in session state and when it needs to be verified
    Iam sending it to backend .
  2. Authentication Flow:
    All endpoints are created and working as they should.
  3. Database Changes:
    User table created with field like Id, email, hashed password and time it was created also email is unique so no duplicate
    accounts are possible.
  4. Cookie Security:
    As I said it is not working as it should but everything is set up correctly.
  5. Security Considerations:
    Password is hashed using bcrypt. JWT is signed and
    validated corectly using secret key. Token expiration
    implemented.
  6. Error Handling & Logging:
    It is possible I forgot some error responses but most of
    them are there
    Checklist:
  • JWT-based cookie authentication implemented.
  • Passwords are securely hashed using a library like bcrypt.
  • Sign up route created for user registration.
  • Sign in route created for user authentication and cookie setup.
  • Logout route created to clear the authentication cookie.
  • JWT access token is stored securely in HTTP-only cookies.
  • Database migration added for creating the users table.
  • Proper error handling and logging added.
  • Folder structure follows the project standard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant