Fix(Authentication): Fix error causing cookie from Auth0 for login callback method to be blocked by samesite configuration.
This commit is contained in:
@@ -37,9 +37,9 @@ class Config:
|
|||||||
'pool_timeout': 30,
|
'pool_timeout': 30,
|
||||||
}
|
}
|
||||||
# Auth0
|
# Auth0
|
||||||
SESSION_COOKIE_SECURE = False
|
SESSION_COOKIE_SECURE = True # depends on is_producction
|
||||||
SESSION_COOKIE_HTTPONLY = True
|
SESSION_COOKIE_HTTPONLY = True
|
||||||
SESSION_COOKIE_SAMESITE = 'None'
|
SESSION_COOKIE_SAMESITE = 'None' # depends on is_producction
|
||||||
REMEMBER_COOKIE_SECURE = True
|
REMEMBER_COOKIE_SECURE = True
|
||||||
WTF_CSRF_ENABLED = True
|
WTF_CSRF_ENABLED = True
|
||||||
# WTF_CSRF_CHECK_DEFAULT = False # We'll check it manually for API routes
|
# WTF_CSRF_CHECK_DEFAULT = False # We'll check it manually for API routes
|
||||||
@@ -95,6 +95,7 @@ class DevelopmentConfig(Config):
|
|||||||
DEBUG = True
|
DEBUG = True
|
||||||
MAIL_DEBUG = True
|
MAIL_DEBUG = True
|
||||||
SESSION_COOKIE_SECURE = False
|
SESSION_COOKIE_SECURE = False
|
||||||
|
SESSION_COOKIE_SAMESITE = 'Lax' # depends on is_producction
|
||||||
|
|
||||||
class ProductionConfig(Config):
|
class ProductionConfig(Config):
|
||||||
is_production = True
|
is_production = True
|
||||||
|
|||||||
Reference in New Issue
Block a user