cryogon
February 24, 2023, 3:34pm
1
How can I refresh user information when it is changed by management api.
Suppose User changed his profile picture it should reflect on user object (I am using auth-0/vue)
tyf
February 24, 2023, 11:35pm
3
Hey again @cryogon !
You could perform silent auth to get new tokens - In this particular case (profile pic) you’d need an ID token since that will contain user profile data. Depending on the specifics you may want to take a look at getAccessTokenSilently
here:
You can set cachemode: 'off'
to force the refresh of tokens even if they aren’t expired, this is outlined here:
# Auth0-Vue v2 Migration Guide
With the v2 release of Auth0-Vue we have updated to the latest version of Auth0-SPA-JS which brings improvements to performance and developer experience. However, as with any major version bump there are some breaking changes that will impact your applications.
Please review this guide thoroughly to understand the changes required to migrate your application to v2.
- [Polyfills and supported browsers](#polyfills-and-supported-browsers)
- [Public API Changes](#public-api-changes)
- [`client_id` has been renamed to `clientId`](#client_id-has-been-renamed-to-clientid)
- [Introduction of `authorizationParams`](#introduction-of-authorizationparams)
- [Introduction of `logoutParams`](#introduction-of-logoutparams)
- [`buildAuthorizeUrl` has been removed](#buildauthorizeurl-has-been-removed)
- [`buildLogoutUrl` has been removed](#buildlogouturl-has-been-removed)
- [`redirectMethod` has been removed from `loginWithRedirect`](#redirectmethod-has-been-removed-from-loginwithredirect)
- [`localOnly` logout has been removed, and replaced by `openUrl`](#localonly-logout-has-been-removed-and-replaced-by-openUrl)
- [`ignoreCache` on `getAccessTokenSilently` has been removed and replace with `cacheMode`](#ignorecache-on-getaccesstokensilently-has-been-removed-and-replace-with-cachemode)
- [`application/x-www-form-urlencoded` used by default instead of `application/json`](#applicationx-www-form-urlencoded-used-by-default-instead-of-applicationjson)
- [No more iframe fallback by default when using refresh tokens](#no-more-iframe-fallback-by-default-when-using-refresh-tokens)
- [Changes to default scopes](#changes-to-default-scopes)
- [`advancedOptions` and `defaultScope` are removed](#advancedoptions-and-defaultscope-are-removed)
This file has been truncated. show original
Alternatively, if the change is as simple as a profile pic you could get away with just hitting /userinfo
endpoint .
Hope this at least helps you with some idea as to what’s possible!
1 Like
cryogon
February 25, 2023, 4:28pm
4
Thanks for helping again @tyf .
1 Like
tyf
February 27, 2023, 9:20pm
5
No problem, happy to help!
system
Closed
March 13, 2023, 9:21pm
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.