mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
fix: auth using session cookies
This commit is contained in:
+2
-1
@@ -67,7 +67,8 @@ def create_api():
|
||||
app.config["JWT_SECRET_KEY"] = UserConfig().userId
|
||||
app.config["JWT_TOKEN_LOCATION"] = ["cookies"]
|
||||
app.config["JWT_COOKIE_CSRF_PROTECT"] = False
|
||||
app.config["JWT_ACCESS_TOKEN_EXPIRES"] = datetime.timedelta(days=30)
|
||||
app.config["JWT_SESSION_COOKIE"] = False
|
||||
app.config["JWT_ACCESS_TOKEN_EXPIRES"] = int(datetime.timedelta(days=30).total_seconds())
|
||||
|
||||
# CORS
|
||||
CORS(app, origins="*", supports_credentials=True)
|
||||
|
||||
Reference in New Issue
Block a user