This repository has been archived by the owner on Jul 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 674
Handle JWT token refreshing and verifying #883
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
orzechdev
requested review from
dominik-zeglen,
krzysztofwolski and
AlicjaSzu
September 2, 2020 15:43
AlicjaSzu
approved these changes
Sep 3, 2020
orzechdev
force-pushed
the
feature/jwt-expiration
branch
5 times, most recently
from
September 5, 2020 13:12
057e200
to
fc5de92
Compare
orzechdev
changed the title
Handle JWT token refreshing
Handle JWT token refreshing and validating
Sep 5, 2020
orzechdev
changed the title
Handle JWT token refreshing and validating
Handle JWT token refreshing and verifying
Sep 5, 2020
dominik-zeglen
approved these changes
Sep 7, 2020
orzechdev
force-pushed
the
feature/jwt-expiration
branch
from
September 7, 2020 14:13
67126c0
to
9aec6fd
Compare
orzechdev
force-pushed
the
feature/jwt-expiration
branch
from
September 10, 2020 10:55
9aec6fd
to
4d2908d
Compare
orzechdev
force-pushed
the
feature/jwt-expiration
branch
from
September 10, 2020 10:58
4d2908d
to
620ce09
Compare
orzechdev
force-pushed
the
feature/jwt-expiration
branch
from
September 10, 2020 11:23
620ce09
to
3eea75c
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I want to merge this change because... it shows a loading state when the token is refreshing due to token expiration or it is verifying when the application starts - all the token expiration and verification logic is delegated to the SDK, implemented in saleor/saleor-sdk#29 and saleor/saleor-sdk#30 respectively.
SameSite=None
andSecure
flags set inset-cookie
header received fromtokenCreate
mutation (saleor/saleor/core/middleware.py
) - testing with cross-site domains requires HTTPS and Secure flag set to mitigate network attacks https://web.dev/samesite-cookies-explained. Also make sure to have set saleor envJWT_EXPIRE=True
and set expiration delta e.g.JWT_TTL_ACCESS="1 minutes"
.In
saleor/saleor/core/middleware.py
:Screenshots
Pull Request Checklist
Test Environment Config
API_URI=https://master.staging.saleor.rocks/graphql/