Skip to content

Commit

Permalink
Fix drf-oidc-auth rejecting API tokens after 10min
Browse files Browse the repository at this point in the history
Added setting OIDC_LEEWAY with value of 61min for drf-oidc-auth, because
otherwise it will reject API tokens when they are older than the default
value of 10min.

see ByteInternet/drf-oidc-auth#28
  • Loading branch information
tuomas777 committed Jun 20, 2022
1 parent 451e554 commit dc77290
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apartment_application_service/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,10 @@
"ISSUER": env("OIDC_ISSUER"),
}

# drf-oidc-auth rejects tokens older this so we don't want to use the default value 600s
# see https://github.com/ByteInternet/drf-oidc-auth/issues/28
OIDC_AUTH = {"OIDC_LEEWAY": 61 * 60}

SOCIAL_AUTH_TUNNISTAMO_KEY = env("SOCIAL_AUTH_TUNNISTAMO_KEY")
SOCIAL_AUTH_TUNNISTAMO_SECRET = env("SOCIAL_AUTH_TUNNISTAMO_SECRET")
SOCIAL_AUTH_TUNNISTAMO_OIDC_ENDPOINT = env("SOCIAL_AUTH_TUNNISTAMO_OIDC_ENDPOINT")
Expand Down

0 comments on commit dc77290

Please sign in to comment.