Skip to content

feat: add ability to customize access and refresh cookie keys/names#47

Open
DrOncogene wants to merge 1 commit into
k4black:mainfrom
DrOncogene:main
Open

feat: add ability to customize access and refresh cookie keys/names#47
DrOncogene wants to merge 1 commit into
k4black:mainfrom
DrOncogene:main

Conversation

@DrOncogene

@DrOncogene DrOncogene commented Jun 2, 2024

Copy link
Copy Markdown

users are now able to change the cookie names by setting env variables

users are now able to change the cookie names by setting env variables

- defined JWT_ACCESS_COOKIE_NAME and JWT_REFRESH_COOKIE_NAME env variables
- both are used to set the APICookieKey at class definition time
- add samesite and httponly parameters to JwtAuthBase.set_access_cookie and JwtAuthBase.set_refresh_cookie methods
- this allows for more customization of the cookie parameters that FastAPI sets on the response
- every tests passes and other functionalities are as is
@DrOncogene

Copy link
Copy Markdown
Author

@hasB4K @k4black

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant