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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#25] [#36] [Backend] As a user, I can automatically re-authenticate if my access token expires [Backend] As a user, when I am unauthenticated I can see the Login page [#24] [Backend] As a user, when I am authenticated I can see my profile image at the top of all pages #34
base: feature/21-backend-login-email-password
Are you sure you want to change the base?
[#25] [#36] [Backend] As a user, I can automatically re-authenticate if my access token expires [Backend] As a user, when I am unauthenticated I can see the Login page [#24] [Backend] As a user, when I am authenticated I can see my profile image at the top of all pages #34
Changes from 10 commits
90c772d
e3b555e
748b9be
a1e44aa
06139d8
f3f0336
1ca5c97
949171a
8f109f6
126b62e
b2c209c
6f1ddc3
ec620e6
9f8b49e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we rename this function? Because user won't login after running this function but get the new access token.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I named it this because the only difference between the login and refresh-token endpoint is we are sending a
refresh_token
instead ofemail/password
, otherwise endpoint and response are identical.I also deemed "login" just to be storing token in localstorage from endpoint response which is what both do.
Do you still think it's better to change it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, the user needs to log in with their email/password first before they get a refresh token. The user can't initially log in with a refresh token. So to get a new access token, it sounds like the user refreshes the token, not re-login.
Anyway I don't have a strong opinion about this one, I am fine with both name 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't think of that - you're right there's no way to get a refresh_token without logging in first, so I will change the name 👍 @hanam1ni
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As authAdapter changed to all be inside surveyAdapter in the latest survey list PR i have included it here instead:
66a6f8c
@hanam1ni fyi
This file was deleted.
This file was deleted.