sso-pointer
v1.0.5
Published
Single Sign-On (SSO)
Downloads
243
Readme
OAuth Pointer Node.js Library
Installing
npm install oauth-pointer
# or
yarn add oauth-pointer
Documentation
Usage
const { PointerStrategy } = require("sso-pointer");
const pointer = new PointerStrategy("123");
const getAccessToken = async () => {
try {
const rs = await pointer.getAccessToken("dd34c58f8000a0e4e573e8eb");
console.log(rs);
} catch (error) {
console.log(error);
}
};
const { accessToken } = getAccessToken();
const verifyToken = async () => {
try {
const rs = await pointer.verifyAccessToken({
accessToken: accessToken,
// Synchronizes login sessions between apps but increases response time
session: false, //option
});
console.log(rs);
} catch (error) {
console.log(error);
}
};
verifyToken();