Description
oidc-spa is an OpenID Connect client library for browser-based single-page apps. It lets you add login without being tied to one identity provider. The site compares it with provider-specific SDKs such as keycloak-js, auth0-spa-js and MSAL.js, and says it can do anything those can do. It is built for Vite, Create React App and other SPAs, and it has a React API with example projects for TanStack Router and React Router. The frontend handles the token exchange, so your backend is not part of that step, and no database is needed because the OIDC provider acts as the session store. If the configuration is wrong, for example because of a CORS issue, a security header or a Keycloak setting, the library says what is wrong and how to fix it. It also offers automatic logout after a period of inactivity. Configuration guides cover popular providers, and the project is free and open-source software with help on Discord.…
Highlights
- OpenID Connect login for single-page apps
- Works with any OIDC provider, with guides for popular ones
- React API and examples for TanStack Router and React Router
- Token exchange in the frontend, no database needed
- Clear errors for CORS and configuration problems
- Automatic logout after inactivity
Ratings & Reviews
No ratings yet
Be the first to rate Oidc Spa.
People also visit
Oidc Spa FAQ
What is oidc-spa?
An OpenID Connect client library for browser-based single-page apps.
Which identity providers does it work with?
It is not tied to one provider. The site has configuration guides for popular OIDC providers, including Keycloak.
Does it need a backend?
Not for the token exchange, which the frontend handles. No database is needed either.
Which frameworks does it support?
It is built for Vite, Create React App and other SPAs, with a React API and examples for TanStack Router and React Router.
Is it free?
Yes. The site describes it as free and open-source software.
What are the best Oidc Spa alternatives?
Popular alternatives to Oidc Spa include Spring Addons, Oidc Client TS and Identity Idp. See all Oidc Spa alternatives

