sso-pointer
v1.0.7
Published
Single Sign-On (SSO)
Downloads
245
Readme
OAuth Pointer Node.js Library
Installation
npm install oauth-pointer
# or
yarn add oauth-pointer
Usage
const { PointerStrategy } = require("sso-pointer");
const pointer = new PointerStrategy(
process.env.POINTER_CLIENT_ID,
process.env.POINTER_CLIENT_SECRET
);
const data = await pointer.getAccessToken(code);
// {
// accessToken: 'eyJhbGciOiJSUz.......',
// user: { _id: '66f18f7c2c298da02e857d85', email: '[email protected]',image:'image.url.com',name:'Admin' }
// }
//Verify token
const payload = await pointer.verifyAccessToken(accessToken);
console.log(payload);