Let's integrate Keycloak with your web application.
Oidc-spa is a generic OpenID Connect client for Single Page Applications (e.g: Vite).
It is a library that you use to redirect your users to an authentication server like Keycloak when they click on your Sign-in button.
Accessible to all skill levels
In the documentation, we do not assume that you are an expert in OIDC or Keycloak. We offer comprehensive guidance from start to finish, aiming to demystify the technical jargon.
React Integration
Oidc-spa is not tied to any particular UI framework. However, we provide a React API and example projects demonstrating integration withTanstack orReact Router.
TypeScript
Expect best in class type safety: Enhanced API response types based on usage context. Optional Zod integration for validating the user profile from the JWT.
Easy to set up
There is no need for creating special /login
/logout
routes. Just a login()
function to call when you want to redirect your user to the login/registration pages.
Minimal API surface
The library indicates whether the user is authenticated. If they are, you obtain the user profile, a bearer token for calling your API, and a logout()
function. That's all you need.
Auto logout
Effortless setup forautomatic logout after a specified period of inactivity. Are you still there? You will be automatically logged out in 10...9...
Sovereign and Open source Identity Management
Oidc-spa like Keycloakify is an initiative aimed at delivering a comprehensive solution for open source, self-hostable user identity management. The objective is to offer both user and development experiences comparable to those of platforms likeAuth0,Okta,Clerk, etc.
While Keycloak offers extensive capabilities, its complexity can make it challenging to use and integrate. Oidc-spa and Keycloakify seek to simplify Keycloak, ensuring that opting for an open source solution does not compromise user experience or developer productivity.
Free and Open source software
It's an MIT licensed open source project.
You can use it in your commercial projects without any restrictions.
We got you covered
Oidc-spa provides simples solution all common usecases.