more stuff

This commit is contained in:
Georges-Antoine Assi
2024-08-04 19:00:14 -04:00
parent 4096b2392e
commit a46eb5643b
3 changed files with 20 additions and 6 deletions

View File

@@ -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
```

View File

@@ -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

View File

@@ -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