We need to build an auth endpoint that Cognito will redirect to in order to exchange the grant code with an access token. The access token should then be sent to the UI.
We need this function to fetch the pertinent user info from Cognito and create a local record in the RDS database. The user id should be the Cognito id.
The auth token should then be stored in a session table (see the ticket about setting up Devise/Doorkeeper).
We probably need to build a Logout endpoint here as well that destroys the local session and then redirects to Cognito for the full logout.
We have already started exploring this in the dmsp_aws_prototype repository.
We need to build an
auth
endpoint that Cognito will redirect to in order to exchange the grant code with an access token. The access token should then be sent to the UI.We need this function to fetch the pertinent user info from Cognito and create a local record in the RDS database. The user id should be the Cognito id.
The auth token should then be stored in a session table (see the ticket about setting up Devise/Doorkeeper).
We probably need to build a Logout endpoint here as well that destroys the local session and then redirects to Cognito for the full logout.
Build RSpec tests!