Comments (3)
You can store and restore the user data object (incl. access token, ...) anywhere you want.
With settings like
userStore: new WebStorageStateStore({ store: window.localStorage }),
from oidc-client-ts.
Thank you so much, @pamapa, for your detailed response!
If I understand the process correctly, in the case where I'm using secure storage (especially on mobile, with Capacitor for example), I can create a custom WebStorageStateStore
with a custom store that implements AsyncStorage
. By using this approach, at each change event such as SigninRedirectCallback or token refresh, the userManager.storeUser
method will allow me to save a serialized version of the user manager configuration into my secure storage (or should I trigger the userManager.storeUser()
myself ?)
However, to avoid going through a redirection to my Identity Provider's page and for a smoother user experience, I can trigger userManager.getUser
at the application start, which will directly fetch from my secure local storage, thus allowing me to retrieve the information without going through the redirection to the authentication page and then redirect to my protected pages.
Is that correct?
Thanks a lot.
A.
from oidc-client-ts.
If you need guidance on how to make it work with Capacitor you can have a look here:
#537 (comment)
from oidc-client-ts.
Related Issues (20)
- How to use KEYCLOAK_IDENTITY cookie HOT 1
- My client doesnโt know when I have logged out elsewhere HOT 3
- Refresh token reuse
- Add support to define JsonService timeout HOT 4
- Changing HTTP Method from GET to POST for connect/authorize and connect/endsession: Is It Possible? HOT 3
- when authorization server doesn't return refresh token
- Expired refresh and access token does not log out user HOT 2
- client_secret required with PKCE HOT 5
- getUser returns a null value HOT 2
- Invalid scopes HOT 1
- login_required error in web browser console when calling signinRedirectCallback HOT 2
- how to handle client-secret store on backend java spring boot HOT 3
- [feat] Could I add params to handle auto-close after iframe load successfully
- [bug] Dont send`scopes` in token endpoint HOT 1
- signinPopup not close after signed in on Firefox
- signinRedirect - Method Name HOT 1
- How to use this package in React-native HOT 1
- Does this package support ES256? HOT 2
- How to get additional AccessToken Response properties from SigninResponse to User object, or make user object extensible. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oidc-client-ts.