Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itpropro/nuxt-oidc-auth
OIDC (OpenID connect) focused auth module for Nuxt
https://github.com/itpropro/nuxt-oidc-auth
authentication nuxt nuxtjs oauth oauth2 openid-connect security vue
Last synced: 24 days ago
JSON representation
OIDC (OpenID connect) focused auth module for Nuxt
- Host: GitHub
- URL: https://github.com/itpropro/nuxt-oidc-auth
- Owner: itpropro
- License: mit
- Created: 2023-12-17T20:13:55.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-04-13T19:16:50.000Z (7 months ago)
- Last Synced: 2024-04-14T09:51:29.966Z (7 months ago)
- Topics: authentication, nuxt, nuxtjs, oauth, oauth2, openid-connect, security, vue
- Language: TypeScript
- Homepage: https://nuxt.com/modules/nuxt-oidc-auth
- Size: 605 KB
- Stars: 45
- Watchers: 0
- Forks: 5
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[![nuxt-oidc-auth-social-card](https://github.com/itpropro/nuxt-oidc-auth/assets/15030951/41173d50-afd4-4d1e-8cd0-e377d7f7effc)](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
โฉ๏ธย 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//login`, `/auth//logout`, `/auth//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
```bash
pnpm dlx nuxi@latest module add nuxt-oidc-auth
```or manually
```bash
pnpm add -D nuxt-oidc-auth
```Add `nuxt-oidc-auth` to the `modules` section of `nuxt.config.ts`
```js
export default defineNuxtConfig({
modules: [
'nuxt-oidc-auth'
]
})
```## โ ๏ธ Disclaimer
This module is still in development, feedback and contributions are welcome! Use at your own risk.
[npm-version-src]: https://img.shields.io/npm/v/nuxt-oidc-auth?labelColor=18181B&color=28CF8D
[npm-version-href]: https://npmjs.com/package/nuxt-oidc-auth[npm-downloads-src]: https://img.shields.io/npm/dm/nuxt-oidc-auth?labelColor=18181B&color=28CF8D
[npm-downloads-href]: https://npmjs.com/package/nuxt-oidc-auth[license-src]: https://img.shields.io/npm/l/nuxt-oidc-auth?labelColor=18181B&color=28CF8D
[license-href]: https://npmjs.com/package/nuxt-oidc-auth[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
[nuxt-href]: https://nuxt.com