Overview
Nuxt OpenID-Connect is a module for Nuxt 3.0 that provides integration with OpenID-Connect (OIDC). It allows for state management, shared login user info, OIDC provider configuration, and encrypting user info cookies. This module is particularly useful for Nuxt 3.0 users as the official auth module does not yet support it.
Features
- Nuxt 3 module (Note: nuxt 2.x not supported)
- OIDC integration based on openid-client
- State management, shared login user info
- OIDC provider config
- Encrypts userInfo cookie
- Support for browser localStorage to store userInfo, preserving user auth info after page refresh
Installation
To install the Nuxt OpenID-Connect module, follow these steps:
- Add the module to the
nuxt.config.tsfile and change the config to your preferences:
modules: [
'nuxt-openid-connect',
],
openidConnect: {
// your configs here
}
- Once added, use the module in your setup.
- Refer to the usage example provided in the documentation for further guidance.
Summary
Nuxt OpenID-Connect is a valuable module for Nuxt 3.0 users who need OIDC integration. It offers features such as state management, shared login user info, and OIDC provider configuration. The module is easy to install and customize to fit specific project needs. Overall, it simplifies the authentication process and improves the user experience.