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 https://github.com/Clinical-Genomics/cg/issues/3027.
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 https://github.com/Clinical-Genomics/cg/issues/3027.
Closes https://github.com/Clinical-Genomics/streamline-delivery/issues/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