setup fastapi auth using authentik instance
This commit is contained in:
parent
4ad04775c9
commit
9b03ab83d2
5 changed files with 175 additions and 19 deletions
16
crawler/api/config.py
Normal file
16
crawler/api/config.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from datetime import timedelta
|
||||
|
||||
|
||||
# Authentik OIDC Configuration
|
||||
AUTHENTIK_URL = "https://authentik.viktorbarzin.me/"
|
||||
OIDC_CLIENT_ID = "5AJKRgcdgVm1OyApBzFkadDFfStW9a555zwv2MOe"
|
||||
OIDC_METADATA_URL = (
|
||||
f"{AUTHENTIK_URL}/application/o/wrongmove/.well-known/openid-configuration"
|
||||
)
|
||||
|
||||
OIDC_CACHE_TTL = timedelta(
|
||||
hours=1
|
||||
).total_seconds() # Cache to avoid spamming authentik with requests
|
||||
|
||||
DEV_TIER_ORIGINS = ["https://devvm.viktorbarzin.lan/"]
|
||||
PROD_TIER_ORIGINS = ["https://wrongmove.viktorbarzin.me/"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue