Skip to content
R

react-oidc-context

OpenID Connect & OAuth2 authentication

by pamapaFree

#104in UI Libraries
0In stores

Description

react-oidc-context is a lightweight authentication library for React single-page applications. It handles OpenID Connect and OAuth 2 sign-in…

Highlights

  • OpenID Connect and OAuth 2 for React apps
  • AuthProvider and useAuth hook
  • withAuth and withAuthenticationRequired helpers
  • Silent token renewal through oidc-client-ts
  • Automatic sign-in on return visits

Ratings & Reviews

No ratings yet

Be the first to rate react-oidc-context.

People also visit

R

redux-oidc

A package for managing OpenID Connect authentication in redux apps

UI Libraries
Launch
R

react-simple-oauth2-login

A React Component for OAuth2 Login - adapted from react-github-login

UI Libraries
Launch
R

@react-oauth/google

Google OAuth2 using Google Identity Services for React

UI Libraries
Launch
A

auth0-react

Adding Auth0 login, logout, protected routes, or user sessions to a React SPA

AI Skills
Get
O

Oidc Client TS

OpenID Connect (OIDC) and OAuth2 protocol support

Utilities
Launch
R

react-facebook-auth

A Component React for Facebook authentication

UI Libraries
Launch

react-oidc-context FAQ

What does react-oidc-context do?

It adds OpenID Connect and OAuth 2 sign-in to a React single-page app, with the auth state shared through React context.

What does it build on?

The oidc-client-ts library, which its configuration is tightly coupled to.

How do I protect a route?

Wrap the route component with withAuthenticationRequired. Anonymous users are redirected to the login page.

Does it work with class components?

Yes. The withAuth higher-order component adds the auth property to class components.

How do I install it?

Run npm install react-oidc-context or use yarn, as shown in the README.

What are the best react-oidc-context alternatives?

Popular alternatives to react-oidc-context include redux-oidc, react-simple-oauth2-login and @react-oauth/google. See all react-oidc-context alternatives

Developer Stuff

Badges