-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
User token is not refreshed with autoRefreshTokens when invalidated by Magento backend #3151
Comments
Related: vuestorefront/vue-storefront-api#297 |
@patzick after refreshing the page, the user is logged out. Please fix it :) |
@alinadivante are you usune the most current vsapi? It could have not yet been fixed to demo instance: I mean the fix for http status codes which is related to that one |
Fixed with #3342 :) please retest |
@patzick ! We forgot about this PR #3271
and it resolves also this issue: #3343 :) I think #3271 should be merged to release/v.1.10 |
@alinadivante closed in #3345, ported this fix from 1.11 |
ok, for now it is okay, but sometimes, when user opens the page using URL, than "Consumer is not authorized to access self" message appears (user is still logged in). We should improve this in v1.11 |
Hey, this has definitely not been fixed. |
oooooo I see... I had to upgrade that dependency |
Current behavior
When user token is invalidated by Magento backend, refresh logic is not working in /core/lib/sync/task.ts
The error returned by Magento is:
{"code":500,"result":"The consumer isn't authorized to access self."}
The check if token is invalidated looks like:
resultString.indexOf('not authorized')) >= 0
So now it is not passed as 'not authorized' !== ' isn't authorized'
Expected behavior
If user token is invalid and autoRefreshTokens === true, user token should be refreshed
Steps to reproduce the issue
Repository
Can you handle fixing this bug by yourself?
Which Release Cycle state this refers to? Info for developer.
Pick one option.
develop
branch and create Pull Request2. Feature / Improvement
back todevelop
.release
branch and create Pull Request3. Stabilisation fix
back torelease
.hotfix
ormaster
branch and create Pull Request4. Hotfix
back tohotfix
.Environment details
Additional information
The text was updated successfully, but these errors were encountered: