You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The /medic/login/oidc endpoint should support GET requests with a code query param. The code should be the authorization_code coming from the OIDC Provider.
This is the endpoint the OIDC Provider should re-direct back to.
Add a new getOidc function in api/src/controllers/login.js that will handle the request and call through to code in the openid-client to validate the authorization_code.
For a good authorization_code, the OIDC Provider should return an id_token containing the username for the authenticated user.
Lookup the user's doc in _userand confirm oidc_provider value is set
Generate a Couch session cookie for user and respond with valid user session.
This will require access to the Couch secret value which can be requested from the Couch instance. There is some code in the proxy auth PR that does this. I think we might be able to put that functionality for getting the secret into shared-libs/settings (or maybe that code is already sufficient for retrieving the secret value?).
/medic/login/oidc
endpoint should supportGET
requests with acode
query param. Thecode
should be theauthorization_code
coming from the OIDC Provider.getOidc
function inapi/src/controllers/login.js
that will handle the request and call through to code in theopenid-client
to validate theauthorization_code
.authorization_code
, the OIDC Provider should return anid_token
containing the username for the authenticated user._user
and confirmoidc_provider
value is setsecret
value which can be requested from the Couch instance. There is some code in the proxy auth PR that does this. I think we might be able to put that functionality for getting the secret intoshared-libs/settings
(or maybe that code is already sufficient for retrieving the secret value?).The text was updated successfully, but these errors were encountered: