Skip to content

Commit eece7b6

Browse files
authored
Refactor import order and remove unnecessary samesite attribute in set_cookie() calls (#1370)
This pull request refactors the import order and removes the unnecessary samesite attribute in the set_cookie() calls. This change improves the code readability and removes redundant code.
2 parents fc7bcf5 + a2ca8a6 commit eece7b6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "langflow"
3-
version = "0.6.5a10"
3+
version = "0.6.5a11"
44
description = "A Python package with a built-in web application"
55
authors = ["Logspace <[email protected]>"]
66
maintainers = [

src/backend/langflow/api/v1/login.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from fastapi import Request, Response, APIRouter, Depends, HTTPException, status
1+
from fastapi import APIRouter, Depends, HTTPException, Request, Response, status
22
from fastapi.security import OAuth2PasswordRequestForm
33
from sqlmodel import Session
44

@@ -33,8 +33,8 @@ async def login_to_get_access_token(
3333

3434
if user:
3535
tokens = create_user_tokens(user_id=user.id, db=db, update_last_login=True)
36-
response.set_cookie("refresh_token_lf", tokens["refresh_token"], httponly=True, secure=True, samesite="strict")
37-
response.set_cookie("access_token_lf", tokens["access_token"], httponly=False, secure=True, samesite="strict")
36+
response.set_cookie("refresh_token_lf", tokens["refresh_token"], httponly=True, secure=True)
37+
response.set_cookie("access_token_lf", tokens["access_token"], httponly=False, secure=True)
3838
return tokens
3939
else:
4040
raise HTTPException(

0 commit comments

Comments
 (0)