Comments (3)
I don't quite follow you here. It is perfectly fine for the user to be null and isLoadingUser to be false. This just says that no user is currently logged in and doesn't in itself suggest that something has gone wrong. When the auth server is down, redirection on a login attempt would fail visibly, as in you get an error in the browser during redirection. Since the auth server is completely separated from the app itself, it is hard to check for this until you run into it,
You could implement something yourself by manually pinging the auth server before redirection occurs to dispatch some kind of error into your reducer when it returns 404 or 500. However I don't think that this is a requirement for this library.
from redux-oidc.
I get what you're saying, my issue probably is more due to my unique specs than any drawbacks with this library.
In my app, I don't have a login screen. My app is being integrated into another code-base and the login is done in the other code-base. So when you enter the home page of my app, I dispatch a random action right away to get the middleware started. When everything is working, it'll hit the OAuth server and redirect to the callback page, which then redirects back to the previous page. But when my OAuth server is down, it just sits on the homepage of my app with actions that try and ultimately fail to make requests to my API. The only indication I have that anything has gone wrong (other than my API methods failing) is an error in the console saying that the connection to my OAuth server was rejected.
But I suppose I can handle this by either writing a method to ping the server or just wait for my API call to fail and check the status code.
Thanks for your input!
from redux-oidc.
No problem. I'll close this for now.
from redux-oidc.
Related Issues (20)
- LOADING_USER called multiple times from my reducers
- User signed out when calling silent renew HOT 1
- access_token is undefined in user object HOT 1
- user State is not getting maintained between browser tabs HOT 2
- Error when automatically trying to reauthenticate HOT 1
- Using the library with authorization code + PKCE HOT 1
- How to store the auth token in a cookie called 'token'? HOT 1
- Passing runtime configuration to UserManager HOT 1
- On redirect, LOADING_USER and USER_EXPIRED fires just before USER_FOUND HOT 1
- errorCallback called right after successCallback in Google Chrome and Edge HOT 5
- Redux state changed to Loading_user , User_Expired, User_found HOT 1
- Update UserManager authority after creation? HOT 1
- Google OAuth: Refresh token not present in token response HOT 7
- Passing state from signinRedirect to successCallback
- Manually update the oidcUser object with extra info
- Multiple-Apps-And-One-IdentityServer
- React js version 18 typescripts issue HOT 4
- Switch oidc-client to oidc-client-ts HOT 1
- redux-oidc(4.0.0-beta1) onSuccessCallback - redirect is not working HOT 1
- Support for React 18? HOT 17
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 redux-oidc.