redux-oidc | managing OpenID Connect authentication in ReactJS / Redux | Authentication library

 by   maxmantz JavaScript Version: 4.0.0-beta1 License: MIT

kandi X-RAY | redux-oidc Summary

kandi X-RAY | redux-oidc Summary

redux-oidc is a JavaScript library typically used in Security, Authentication, React applications. redux-oidc has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can install using 'npm i redux-oidc' or download it from GitHub, npm.

This package handles OpenID-Connect authentication in redux apps. It enables redux apps to authenticate with an external OIDC authentication provider and handles the actions of the OpenID implicit flow or authorization code flow. It uses the oidc-client-js library to manage OpenID Connect functionality.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              redux-oidc has a low active ecosystem.
              It has 400 star(s) with 106 fork(s). There are 16 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 21 open issues and 142 have been closed. On average issues are closed in 22 days. There are 17 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of redux-oidc is 4.0.0-beta1

            kandi-Quality Quality

              redux-oidc has 0 bugs and 0 code smells.

            kandi-Security Security

              redux-oidc has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              redux-oidc code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              redux-oidc is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              redux-oidc releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions are available. Examples and code snippets are not available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed redux-oidc and discovered the below as its top functions. This is intended to give you an instant insight into redux-oidc implemented functionality, and help decide if they suit your requirements.
            • The handler middleware for storing actions
            • Handle user callback
            • Infinite error handler .
            • Create a user document not found
            • Logs the user object expired
            • Load user error
            • Signs out of the user .
            • The loading user has been loaded
            • Create a user expiring expiry expired .
            • Creates a new Session object .
            Get all kandi verified functions for this library.

            redux-oidc Key Features

            No Key Features are available at this moment for redux-oidc.

            redux-oidc Examples and Code Snippets

            No Code Snippets are available at this moment for redux-oidc.

            Community Discussions

            QUESTION

            Getting a redux-oidc JavaScript error when I try to navigate to sign in, where would I fix it?
            Asked 2021-Dec-09 at 10:36

            I tried implementing redux-oidc by following the guide on the GitHub page. I am connecting to a IDP server built by me using identity server. I thought everything was set up properly but got the error below. How can I fix this or find the source of the issue?

            ...

            ANSWER

            Answered 2021-Dec-09 at 10:36

            Fixed it, the issue was happening because I needed to add Prevent Default to the button click.

            Source https://stackoverflow.com/questions/70258215

            QUESTION

            CORS Error using oidc-client in React SPA with ADFS
            Asked 2021-Jul-06 at 21:19

            At a loss here, trying to do authorization code flow with oidc-client and redux-oidc, in my React app against an ADFS instance as the authorization server. My issue is that I am failing to post to .../adfs/oauth2/token with the authorization code during my SignInCallback, visually Part D) in the Diagram here. Every attempt results in a CORS error appearing in my browser, tried on Chrome and Firefox, there is no preflight check and I can see the id_token, access_token, and refresh_token in the response.

            I can post from postman to that endpoint with no CORS error. The only workaround I've found was using a browser extension to allow CORS but this isn't suited for production. Why is my browser doing this?

            My Config:

            ...

            ANSWER

            Answered 2021-Jul-06 at 21:19

            I suspect you are missing standard CORS headers in the response - namely Access-Control-Allow-Origin, and therefore, because the response is not in your SPA's domain, the browser cannot read it.

            In ADFS 2019 there are some ways to customize the behaviour.

            If this doesn't work for you then another option is to use a Back End for Front End API to proxy certain requests for you. Note also that this approach is recommended in 2021 for SPAs anyway.

            Source https://stackoverflow.com/questions/68263292

            QUESTION

            fire redux action from extraReducers
            Asked 2021-May-27 at 22:42

            First, I know (or I think I've read) that you're never supposed to fire actions from reducers. In my situation, I'm using redux-oidc to handle authentication against my app. Once the user is logged in, redux-oidc fires a redux-oidc/USER_FOUND action and sets the user's profile in the state.oidc.user slice.

            After login, I need to look up additional info about the user from my DB that isn't in the OIDC response. At the moment, I'm firing the fetchUserPrefs thunk from the redux-oidc.CallbackComponent.successCallback which works as expected.

            My problem is when the user has an active session and opens a new browser, or manually refreshes the page and init's the app again, the callback isn't hit, so the additional user hydration doesn't happen. It seems like what I want to do is add an extraReducer that listens for the redux-oidc/USER_FOUND action and triggers the thunk, but this would be firing an action from a reducer.

            Is there a better way to do this?

            ...

            ANSWER

            Answered 2021-May-27 at 22:42

            You are correct that you cannot dispatch an action from a reducer. You want to listen for an action to be dispatched and dispatch another action in response. That is a job for middleware. Your middleware should look something like this:

            Source https://stackoverflow.com/questions/67712767

            QUESTION

            Recently identityserver 4 auth has started to constantly hit the authorize, and silent renew endpoints
            Asked 2020-Sep-02 at 21:57

            We have 3 apps: Client (React/SPA), API (ASP.NET CORE 3.1), and Auth (ASP.NET CORE 3.1 with IdentityServer 4).

            Fairly recently, the app is starting to constantly do what appears to be a silent renew. As soon as the client app loads, I can see in the network tab that it immediately hits the authorize endpoint on the identity server, then I see the silent renew page load in an iframe on the app, then it hits the token endpoint on the identity server, then userinfo, and it just keeps cycling through this sequence - just never stops. Over an over. We use redux-oidc, which runs over oidc-client, and I can see within the console that this isn't being done or handled by redux-oidc. I can also see when handling events on the usermnanager that my token isn't expiring, so it doesn't appear to be kicking this off either. We have on our identity server samesite=none with the secure attribute too for cookies that come out of there as well, as I thought that might be the problem, but this is still occurring.

            Is there something else we should be looking at? And why would this have all of a sudden recently started happening - we even backed our code out to a version from over a month ago, and the problem still occurs, so we're not aware of any code changes we did that could cause this as this just started happening within the last week I believe.

            ...

            ANSWER

            Answered 2020-Sep-02 at 21:57

            HttpOnly is a flag added to cookies that tell the browser not to display the cookie through client-side scripts. When you set a cookie with the HttpOnly flag, it informs the browser that this special cookie should only be accessed by the server.

            But that cookie is required by the OIDC session management spec for JS/SPA clients. If you change it, you will break those types of clients. This is by design, check the spec https://openid.net/specs/openid-connect-session-1_0.html#ChangeNotification

            So you are good as is no need to set HttpOnly to true.

            Source https://stackoverflow.com/questions/63711189

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install redux-oidc

            This package wraps oidc-client-js to use with ReactJS / Redux apps. Install oidc-client like this:. In addition there is a peer dependency for immutable.js, if you want to use it. You need the babel-polyfill in your build configuration for this package to work.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • npm

            npm i redux-oidc

          • CLONE
          • HTTPS

            https://github.com/maxmantz/redux-oidc.git

          • CLI

            gh repo clone maxmantz/redux-oidc

          • sshUrl

            git@github.com:maxmantz/redux-oidc.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Authentication Libraries

            supabase

            by supabase

            iosched

            by google

            monica

            by monicahq

            authelia

            by authelia

            hydra

            by ory

            Try Top Libraries by maxmantz

            redux-oidc-example

            by maxmantzJavaScript

            EF7-ManyToManyBug

            by maxmantzC#

            IdSrvDeploymentApp

            by maxmantzC#