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'
If user token is invalid and autoRefreshTokens === true, user token should be refreshed
1) Create user account
2) Wait timeout to user token invalidated on Magento Backend
3) Reload application home page
Pick one option.
develop branch and create Pull Request 2. Feature / Improvement back to develop.release branch and create Pull Request 3. Stabilisation fix back to release.hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.@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 https://github.com/DivanteLtd/vue-storefront/pull/3271
and this one resolves problem, which I mentioned here #3237
When I change manually token in dev console (shop/user/current-token) and open again my account and refresh page - there is info "Consumer is not authorized to access self" but user is still logged in.
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
please retest :)
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.
Once the token expires it never gets refreshed.
"Consumer is not authorized to access self" on each and every refresh after that
oooooo I see...
It has been fixed in https://github.com/DivanteLtd/magento2-rest-client/commit/fb5adcb24fe25e097c2127a3ded5ef05e0fcb2f7
I had to upgrade that dependency