mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-18 20:54:04 +02:00
fix: fix broken password+email login because of CORS
This commit is contained in:
@@ -101,7 +101,8 @@ class RedirectingCookieTransport(CookieTransport):
|
||||
|
||||
|
||||
bearer_transport = BearerTransport(tokenUrl="auth/jwt/login")
|
||||
cookie_transport = RedirectingCookieTransport(cookie_max_age=LIFETIME)
|
||||
cookie_transport = CookieTransport(cookie_max_age=LIFETIME)
|
||||
oauth_cookie_transport = RedirectingCookieTransport(cookie_max_age=LIFETIME)
|
||||
|
||||
bearer_auth_backend = AuthenticationBackend(
|
||||
name="jwt",
|
||||
@@ -113,6 +114,11 @@ cookie_auth_backend = AuthenticationBackend(
|
||||
transport=cookie_transport,
|
||||
get_strategy=get_jwt_strategy,
|
||||
)
|
||||
oauth_cookie_auth_backend = AuthenticationBackend(
|
||||
name="cookie",
|
||||
transport=oauth_cookie_transport,
|
||||
get_strategy=get_jwt_strategy,
|
||||
)
|
||||
|
||||
fastapi_users = FastAPIUsers[User, uuid.UUID](get_user_manager, [bearer_auth_backend, cookie_auth_backend])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user