Giter Site home page Giter Site logo

Comments (3)

maxmantz avatar maxmantz commented on August 18, 2024

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.

jbuck79 avatar jbuck79 commented on August 18, 2024

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.

maxmantz avatar maxmantz commented on August 18, 2024

No problem. I'll close this for now.

from redux-oidc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.