Skip to content

Commit

Permalink
fix: fix cookies not being saved
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucerna00 committed May 21, 2024
1 parent c86d04a commit 61f2536
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ def post(self, request):
)

# JWT을 쿠키에 저장
res.set_cookie('access', access_token, httponly=True)
res.set_cookie('refresh', refresh_token, httponly=True)
res.set_cookie('access', access_token, httponly=True, secure=True, samesite='None')
res.set_cookie('refresh', refresh_token, httponly=True, secure=True, samesite='None')
return res
else:
return Response({'result': 'fail', 'message': 'The ID or password is incorrect.'}, status=status.HTTP_400_BAD_REQUEST)
Expand Down

0 comments on commit 61f2536

Please sign in to comment.