Home
Softono
nuxt-oidc-auth

nuxt-oidc-auth

Open source MIT TypeScript
159
Stars
47
Forks
39
Issues
0
Watchers
1 month
Last Commit

About nuxt-oidc-auth

[![nuxt-oidc-auth-social-card](https://github.com/user-attachments/assets/77ab04f8-7823-4dee-bae4-841e46357d6e)](https://nuxt.com/modules/nuxt-oidc-auth) # Nuxt OIDC Auth [![npm version][npm-version-src]][npm-version-href] [![npm downloads][npm-downloads-src]][npm-downloads-href] [![License][license-src]][license-href] [![Nuxt][nuxt-src]][nuxt-href] Welcome to **Nuxt OIDC Auth**, a Nuxt module focusing on native OIDC (OpenID Connect) based authentication for Nuxt with a high level of customizability and security for SSR applications. This module doesn't use any external dependencies outside of the [unjs](https://unjs.io/) ecosystem except for token validation (the well known and tested `jose` library for JWT interactions). πŸ‘‰ [Documentation](https://nuxtoidc.cloud/) ## Features ↩️&nbsp; Automatic session and token renewal<br> πŸ’Ύ&nbsp; Encrypted server side refresh/access token storage powered by Nitro storage<br> πŸ”‘&nbsp; Token validation<br> πŸ”’&nbsp; Secured & sealed cookies sessions<br> βš™οΈ&nbsp; Prese ...

Platforms

Web Self-hosted Cloud

Languages

TypeScript

nuxt-oidc-auth-social-card

Nuxt OIDC Auth

npm version npm downloads License Nuxt

Welcome to Nuxt OIDC Auth, a Nuxt module focusing on native OIDC (OpenID Connect) based authentication for Nuxt with a high level of customizability and security for SSR applications. This module doesn't use any external dependencies outside of the unjs ecosystem except for token validation (the well known and tested jose library for JWT interactions).

πŸ‘‰ Documentation

Features

↩️  Automatic session and token renewal
πŸ’Ύ  Encrypted server side refresh/access token storage powered by Nitro storage
πŸ”‘  Token validation
πŸ”’  Secured & sealed cookies sessions
βš™οΈ  Presets for popular OIDC providers
πŸ“€  Global middleware with automatic redirection to default provider or a custom login page (see playground)
πŸ‘€  useOidcAuth composable for getting the user information, logging in and out, refetching the current session and triggering a token refresh
πŸ—‚οΈ  Multi provider support with auto registered routes (/auth/<provider>/login, /auth/<provider>/logout, /auth/<provider>/callback)
πŸ“  Generic spec OpenID compatible connect provider with fully configurable OIDC flow (state, nonce, PKCE, token request, ...)
πŸ•™  Session expiration check

Installation

Add nuxt-oidc-auth dependency to your project

With nuxi

pnpm dlx nuxi@latest module add nuxt-oidc-auth

or manually

pnpm add nuxt-oidc-auth

Add nuxt-oidc-auth to the modules section of nuxt.config.ts

export default defineNuxtConfig({
  modules: ['nuxt-oidc-auth'],
})

⚠️ Disclaimer

This module is still in development, feedback and contributions are welcome! Use at your own risk.