-
Notifications
You must be signed in to change notification settings - Fork 2
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 /auth endpoint #402
Add /auth endpoint #402
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Will probably need some manual testing since external APIs are involved but massive effort 💪
alembic/versions/2024_03_08_febdb4e78bb5_add_refresh_token_column.py
Outdated
Show resolved
Hide resolved
trailblazer/clients/authentication_client/google_oauth_client.py
Outdated
Show resolved
Hide resolved
|
Description
Add
/auth
endpoint. A step in supporting the authorization code flow, see docs. The documentation describes the entire flow, this PR implements Step 5:Exchange authorization code for refresh and access tokens
.This endpoint will be used when a user signs in via Google to exchange the resulting authorization code for a refresh and access token. We can likely extract this service in the future, added to backlog here Clinical-Genomics/cg#3027.
Closes Clinical-Genomics/streamline-delivery#58. The goal is to ensure users in Cigrid do not have to re-login during the workday.
The new components:
refresh_token
in user tableThe authentication service does the following
This logic is exposed via the
/auth
endpoint.Added
/auth
endoint