diff --git a/DEVELOPER_SETUP.md b/DEVELOPER_SETUP.md index 494b647ab..a2415833e 100644 --- a/DEVELOPER_SETUP.md +++ b/DEVELOPER_SETUP.md @@ -130,3 +130,17 @@ cd backend # path or test file can be passed as argument to test only a subset poetry run pytest [path/file] ``` + +## Hydra setup + +```sh +docker exec hydra hydra create client \ + --endpoint http://127.0.0.1:4445/ \ + --format json \ + --grant-type authorization_code,refresh_token \ + --redirect-uri "http://localhost:3000/api/oauth/openid" \ + --scope openid \ + --scope profile \ + --scope email \ + --scope offline +``` diff --git a/backend/endpoints/auth.py b/backend/endpoints/auth.py index aba14bd8c..3e379d106 100644 --- a/backend/endpoints/auth.py +++ b/backend/endpoints/auth.py @@ -187,7 +187,7 @@ async def login_via_openid(request: Request): return await oauth.openid.authorize_redirect(request, OAUTH_REDIRECT_URI) -@router.get("/auth/openid") +@router.get("/oauth/openid") async def auth_openid(request: Request): """OAuth2 callback endpoint diff --git a/hydra/quickstart/hydra.yml b/hydra/quickstart/hydra.yml index 8d69cc1d2..93508a972 100644 --- a/hydra/quickstart/hydra.yml +++ b/hydra/quickstart/hydra.yml @@ -5,13 +5,13 @@ serve: urls: self: issuer: http://127.0.0.1:4444 - consent: http://127.0.0.1:3000/consent - login: http://127.0.0.1:3000/login - logout: http://127.0.0.1:3000/logout + consent: http://127.0.0.1:3000/api/oauth/consent + login: http://127.0.0.1:3000/api/oauth/openid + logout: http://127.0.0.1:3000/api/logout secrets: system: - - youReallyNeedToChangeThis + - 29cacc1faa7aa7f00da3fae543f2f0de oidc: subject_identifiers: @@ -19,4 +19,4 @@ oidc: - pairwise - public pairwise: - salt: youReallyNeedToChangeThis + salt: 29cacc1faa7aa7f00da3fae543f2f0de