René Preuß c954054621 Change readme
2023-02-18 14:34:42 +01:00
2023-02-18 14:27:55 +01:00
2023-02-18 14:27:55 +01:00
2023-02-18 14:27:55 +01:00
2023-02-18 14:27:55 +01:00
2023-02-18 14:27:55 +01:00
2023-02-18 14:27:55 +01:00
2023-02-18 14:27:55 +01:00
2023-02-18 14:27:55 +01:00
2023-02-18 14:27:55 +01:00
2023-02-18 14:34:42 +01:00
2023-02-18 14:27:55 +01:00
2023-02-18 14:28:34 +01:00
2023-02-18 14:34:42 +01:00
2023-02-18 14:27:55 +01:00

@bitinflow/nuxt-oauth

Nuxt module for OAuth2 authentication

Features

  • 📦 OAuth2 authentication
  • 📦 Supports only one OAuth2 provider
  • 📦 Supports only implicit flow

Quick Setup

  1. Add @bitinflow/nuxt-oauth dependency to your project
# Using pnpm
pnpm add -D @bitinflow/nuxt-oauth

# Using yarn
yarn add --dev @bitinflow/nuxt-oauth

# Using npm
npm install --save-dev @bitinflow/nuxt-oauth
  1. Add @bitinflow/nuxt-oauth to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    '@bitinflow/nuxt-oauth'
  ],

  oauth: {
    redirect: {
      login: '/login',
      logout: '/',
      callback: '/login',
      home: '/home'
    },
    endpoints: {
      authorization: 'https://example.com/v1/oauth/authorization',
      userInfo: `https://example.com/api/users/me`,
      logout: 'https://example.com/oauth/logout'
    },
    clientId: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx',
    scope: ['user:read']
  },
})

That's it! You can now use @bitinflow/nuxt-oauth in your Nuxt app

Development

# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release
Description
No description provided
Readme 303 KiB
Languages
TypeScript 92%
Vue 8%