Skip to content
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

Add auto-refresh to JWT #158

Merged
merged 8 commits into from
Oct 14, 2021
Merged

Add auto-refresh to JWT #158

merged 8 commits into from
Oct 14, 2021

Conversation

ryanmahan
Copy link
Collaborator

@ryanmahan ryanmahan commented Sep 21, 2021

Added:

  • header and cookie support. Check the header first, if not present check the cookie
  • auto-refresh cookies on every API call, via a post-request function
  • refresh token endpoint that returns a new valid token for API users
    • Not sure if this is implemented correctly, I use the auth token and not the refresh token to validate this
  • test for /auth/test endpoint and cookie setting
  • Config vars for setting cookies securely and preventing forgery in production

Removed:
None

Aligns with issue #2 and somewhat to #104, we only store basic information and role as an enum currently.

JMStudiosJoe
JMStudiosJoe previously approved these changes Sep 27, 2021
Copy link
Member

@alexjball alexjball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor config changes requested, but LGTM once addressed!

backend/auth/auth.py Outdated Show resolved Hide resolved
backend/auth/auth.py Outdated Show resolved Hide resolved
@alexjball alexjball merged commit bf236d3 into codeforboston:main Oct 14, 2021
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.

[FEATURE] Use double submit verification for browser auth
3 participants