Spaces:
Sleeping
Sleeping
cross origin
Browse files
app/api/v1/endpoints/auth.py
CHANGED
|
@@ -12,10 +12,10 @@ router = APIRouter()
|
|
| 12 |
def set_auth_cookies(response: Response, access_token: str, refresh_token: str):
|
| 13 |
"""Utility function to set auth cookies on a response."""
|
| 14 |
response.set_cookie(
|
| 15 |
-
key="access_token", value=access_token, httponly=True, samesite="
|
| 16 |
)
|
| 17 |
response.set_cookie(
|
| 18 |
-
key="refresh_token", value=refresh_token, httponly=True, samesite="
|
| 19 |
)
|
| 20 |
|
| 21 |
def delete_auth_cookies(response: Response):
|
|
|
|
| 12 |
def set_auth_cookies(response: Response, access_token: str, refresh_token: str):
|
| 13 |
"""Utility function to set auth cookies on a response."""
|
| 14 |
response.set_cookie(
|
| 15 |
+
key="access_token", value=access_token, httponly=True, samesite="none", secure=True
|
| 16 |
)
|
| 17 |
response.set_cookie(
|
| 18 |
+
key="refresh_token", value=refresh_token, httponly=True, samesite="none", secure=True
|
| 19 |
)
|
| 20 |
|
| 21 |
def delete_auth_cookies(response: Response):
|