aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gn_auth/auth/jwks.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/gn_auth/auth/jwks.py b/gn_auth/auth/jwks.py
index 7c091b8..1352b95 100644
--- a/gn_auth/auth/jwks.py
+++ b/gn_auth/auth/jwks.py
@@ -4,11 +4,13 @@ from pathlib import Path
from typing import Any, Union
from datetime import datetime
+from flask import Flask
from authlib.jose import JsonWebKey
from pymonad.either import Left, Right, Either
-def jwks_directory(appsecretsdir: Path) -> Path:
+def jwks_directory(app: Flask) -> Path:
"""Compute the directory where the JWKs are stored."""
+ appsecretsdir = Path(app.config["GN_AUTH_SECRETS"]).parent
if appsecretsdir.exists() and appsecretsdir.is_dir():
jwksdir = Path(appsecretsdir, "jwks/")
if not jwksdir.exists():