@wisemen/oauth2-vue-client
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

oAuth Vue Client

This is a Vue.js client that uses our customer oAuthClient package to authenticate users with our oAuth server.

Installation

pnpm install @wisemen/oauth2-vue-client

Usage

// src/libs/oAuth.lib.ts
import { OAuth2VueClient } from '@appwise/oauth2-vue-client'
import axios from 'axios'

const API_CLIENT_ID = import.meta.env.API_CLIENT_ID
const API_CLIENT_SECRET = import.meta.env.API_CLIENT_SECRET
const API_AUTH_URL = import.meta.env.API_AUTH_URL

export const oAuthClient = new OAuth2VueClient({
  axios,
  clientId: API_CLIENT_ID,
  clientSecret: API_CLIENT_SECRET,
  tokenEndpoint: `${API_AUTH_URL}/token`,
})
// src/libs/axios.lib.ts
axios.interceptors.request.use((config) => addAuthorizationHeader(oAuthClient, config))

Readme

Keywords

none

Package Sidebar

Install

npm i @wisemen/oauth2-vue-client

Weekly Downloads

5

Version

2.1.0

License

MIT

Unpacked Size

46.1 kB

Total Files

8

Last publish

Collaborators

  • wouter.appwise
  • kobe-kwanten-wisemen
  • jorenvandeweyer
  • robbe95
  • fullmetaljs
  • maartensijmkens
  • wisemen-sysops
  • peetha
  • daanpersoons
  • jonasvannieuwenhuijsen
  • yuhanghu
  • jonasbeckers