Search code examples
reactjsactive-directorysingle-sign-onopenid-connectokta

Is it possible to implement open id connect SSO in ReactJS with IDP independent code?


I have created an SSO in open id connect using Okta as a primary identity provider in a ReactJS and .NET 5 application. The problem is that, for using other Identity Providers like Azure Active Directory, it should be done through configuring in Okta portal. I want to implement it in such a way that the application can be connected to any Identity Provider without getting tied down to one particular Identity Provider. Is this possible? If it's possible please tell me how I should proceed? Any help help is much appreciated.

Please note that I am not looking to simultaneously connect to different identity provider.


Solution

  • I implemented this using oidc-client for the ReactJS application and IdentityServer4 for the .NET 5 api. If you want to know more about the implementation part, check this article here.

    For connecting external identity provider to IdentityServer4, you can refer this documentation