Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mybiogen/auth-openid

Package Overview
Dependencies
Maintainers
9
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mybiogen/auth-openid - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

lib/JanrainJS.d.ts
import OpenIDClient from './OAuthClient';
import { OAuthUserInfo } from './types';
export declare type JanrainUserInfo = OAuthUserInfo;
export declare type JanrainUserInfo = OAuthUserInfo & {
picture: string;
};
export default class JanrainJS extends OpenIDClient<JanrainUserInfo> {

@@ -5,0 +7,0 @@ constructor(clientId: string, configUrl: string, redirectURI: string);

@@ -22,2 +22,2 @@ "use strict";

exports.default = JanrainJS;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSmFucmFpbkpTLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0phbnJhaW5KUy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLGdFQUF5QztBQUt6QyxNQUFxQixTQUFVLFNBQVEscUJBQTZCO0lBQ2xFLFlBQVksUUFBZ0IsRUFBRSxTQUFpQixFQUFFLFdBQW1CO1FBQ2xFLEtBQUssQ0FBQyxRQUFRLEVBQUUsU0FBUyxFQUFFLFdBQVcsRUFBRSxlQUFlLENBQUMsQ0FBQztJQUMzRCxDQUFDO0lBR1MsWUFBWSxDQUFDLFFBQWE7UUFDbEMsT0FBTztZQUNMLEVBQUUsRUFBRSxRQUFRLENBQUMsR0FBRztZQUNoQixLQUFLLEVBQUUsUUFBUSxDQUFDLEtBQUs7WUFDckIsSUFBSSxFQUFFLFFBQVEsQ0FBQyxVQUFVO1lBQ3pCLFFBQVEsRUFBRSxRQUFRLENBQUMsV0FBVztZQUM5QixPQUFPLEVBQUUsUUFBUSxDQUFDLE9BQU87U0FDMUIsQ0FBQztJQUNKLENBQUM7Q0FDRjtBQWZELDRCQWVDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IE9wZW5JRENsaWVudCBmcm9tICcuL09BdXRoQ2xpZW50JztcbmltcG9ydCB7IE9BdXRoVXNlckluZm8gfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IHR5cGUgSmFucmFpblVzZXJJbmZvID0gT0F1dGhVc2VySW5mb1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBKYW5yYWluSlMgZXh0ZW5kcyBPcGVuSURDbGllbnQ8SmFucmFpblVzZXJJbmZvPiB7XG4gIGNvbnN0cnVjdG9yKGNsaWVudElkOiBzdHJpbmcsIGNvbmZpZ1VybDogc3RyaW5nLCByZWRpcmVjdFVSSTogc3RyaW5nKSB7XG4gICAgc3VwZXIoY2xpZW50SWQsIGNvbmZpZ1VybCwgcmVkaXJlY3RVUkksICdqYW5yYWluX3Rva2VuJyk7XG4gIH1cblxuICAvLyBodHRwczovL2lkZW50aXR5ZG9jcy5ha2FtYWkuY29tL2hvbWUvamFucmFpbi1lbnRpdHktYXBpXG4gIHByb3RlY3RlZCBsb2FkVXNlckluZm8odXNlckpTT046IGFueSk6IEphbnJhaW5Vc2VySW5mbyB7XG4gICAgcmV0dXJuIHtcbiAgICAgIGlkOiB1c2VySlNPTi5zdWIsXG4gICAgICBlbWFpbDogdXNlckpTT04uZW1haWwsXG4gICAgICBuYW1lOiB1c2VySlNPTi5naXZlbl9uYW1lLFxuICAgICAgbGFzdE5hbWU6IHVzZXJKU09OLmZhbWlseV9uYW1lLFxuICAgICAgcGljdHVyZTogdXNlckpTT04ucGljdHVyZSxcbiAgICB9O1xuICB9XG59XG4iXX0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSmFucmFpbkpTLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0phbnJhaW5KUy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmd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FrYW1haS5jb20vaG9tZS9qYW5yYWluLWVudGl0eS1hcGlcbiAgcHJvdGVjdGVkIGxvYWRVc2VySW5mbyh1c2VySlNPTjogYW55KTogSmFucmFpblVzZXJJbmZvIHtcbiAgICByZXR1cm4ge1xuICAgICAgaWQ6IHVzZXJKU09OLnN1YixcbiAgICAgIGVtYWlsOiB1c2VySlNPTi5lbWFpbCxcbiAgICAgIG5hbWU6IHVzZXJKU09OLmdpdmVuX25hbWUsXG4gICAgICBsYXN0TmFtZTogdXNlckpTT04uZmFtaWx5X25hbWUsXG4gICAgICBwaWN0dXJlOiB1c2VySlNPTi5waWN0dXJlLFxuICAgIH07XG4gIH1cbn1cbiJdfQ==

@@ -16,4 +16,7 @@ import { OAuthUserInfo, Token, WatchAuthCallback, Init } from './types';

comesFromLogin: boolean;
hasBeenInitialized: boolean;
constructor(clientId: string, configUrl: string, redirectURI: string, storageKey: string);
init(): Promise<Init | undefined>;
private getTokenOnInit;
private refreshTokenOnInit;
private callListeners;

@@ -30,4 +33,4 @@ private keepRefreshingToken;

private revokeToken;
logout: () => Promise<void>;
logout: (ignoreRevokationErrors?: boolean) => Promise<void>;
}
//# sourceMappingURL=OAuthClient.d.ts.map

@@ -13,2 +13,7 @@ "use strict";

this.keepRefreshingToken = () => {
var _a;
if (!((_a = this.token) === null || _a === void 0 ? void 0 : _a.refreshToken)) {
console.warn("missing refresh token.");
return;
}
if (this.user && this.token && !this.refreshTokenInterval) {

@@ -29,4 +34,4 @@ const SAFETY_GAP_REFRESH_TOKEN = 60000;

this.listeners.push(cb);
const token = await this.init();
if (token) {
await this.init();
if (this.token) {
await this.getUserInfo();

@@ -99,2 +104,5 @@ }

}
if (!this.token.refreshToken) {
throw new Error('Cannot refresh token without refresh token');
}
const body = {

@@ -186,16 +194,20 @@ grant_type: 'refresh_token',

};
this.logout = async () => {
this.logout = async (ignoreRevokationErrors = false) => {
if (!this.token) {
throw new Error('Cannot logout without token');
}
const [revokedAccessToken, revokedRefreshToken] = await Promise.all([
this.revokeToken(this.token.accessToken),
this.revokeToken(this.token.refreshToken),
]);
try {
await Promise.all([
this.revokeToken(this.token.accessToken),
this.revokeToken(this.token.refreshToken),
]);
}
catch (error) {
if (!ignoreRevokationErrors) {
throw error;
}
}
this.comesFromLogin = false;
this.token = undefined;
this.user = undefined;
if (!revokedAccessToken || !revokedRefreshToken) {
throw new Error('Token not revoked');
}
this.callListeners();

@@ -221,4 +233,8 @@ return utils_1.Storage.remove(this.storageKey);

this.comesFromLogin = false;
this.hasBeenInitialized = false;
}
async init() {
if (this.hasBeenInitialized) {
return;
}
const [callbackState, storageOauth] = await Promise.all([

@@ -232,28 +248,37 @@ utils_1.checkCallback(window.location.href),

}
this.hasBeenInitialized = true;
if (callbackState) {
const { code, pkceCodeVerifier, currentState, newUrl, } = callbackState;
this.token = await this.getToken(code, pkceCodeVerifier, currentState);
this.keepRefreshingToken();
window.history.replaceState(window.history.state, document.title, newUrl);
this.comesFromLogin = true;
return this.token
? { accessToken: this.token.accessToken, expiresIn: this.token.expiresIn }
: undefined;
return await this.getTokenOnInit(callbackState);
}
if (storageOauth) {
this.token = storageOauth;
try {
await this.refreshToken();
this.keepRefreshingToken();
}
catch (err) {
this.token = undefined;
utils_1.Storage.remove(this.storageKey);
}
return this.token
? { accessToken: this.token.accessToken, expiresIn: this.token.expiresIn }
: undefined;
return await this.refreshTokenOnInit(storageOauth);
}
return undefined;
}
async getTokenOnInit(callbackState) {
const { code, pkceCodeVerifier, currentState, newUrl, } = callbackState;
this.token = await this.getToken(code, pkceCodeVerifier, currentState);
this.keepRefreshingToken();
window.history.replaceState(window.history.state, document.title, newUrl);
this.comesFromLogin = true;
return this.token;
}
async refreshTokenOnInit(storageOauth) {
var _a;
this.token = storageOauth;
this.comesFromLogin = false;
if (!((_a = this.token) === null || _a === void 0 ? void 0 : _a.refreshToken)) {
console.warn("missing refresh token.");
return this.token;
}
try {
await this.refreshToken();
this.keepRefreshingToken();
}
catch (err) {
this.token = undefined;
utils_1.Storage.remove(this.storageKey);
}
return this.token;
}
callListeners() {

@@ -271,2 +296,2 @@ this.listeners.forEach((cb) => {

exports.default = OpenIDClient;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT0F1dGhDbGllbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvT0F1dGhDbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxnRUFBdUM7QUFDdkMsK0JBQW9DO0FBQ3BDLG1DQUEwRztBQVUxRyxNQUE4QixZQUFZO0lBMkJ4QyxZQUFZLFFBQWdCLEVBQUUsU0FBaUIsRUFBRSxXQUFtQixFQUFFLFVBQWtCO1FBTnhGLGNBQVMsR0FBNkIsRUFBRSxDQUFDO1FBb0ZqQyx3QkFBbUIsR0FBRyxHQUFTLEVBQUU7WUFDdkMsSUFBSSxJQUFJLENBQUMsSUFBSSxJQUFJLElBQUksQ0FBQyxLQUFLLElBQUksQ0FBQyxJQUFJLENBQUMsb0JBQW9CLEVBQUU7Z0JBQ3pELE1BQU0sd0JBQXdCLEdBQUcsS0FBSyxDQUFDO2dCQUN2QyxJQUFJLENBQUMsb0JBQW9CLEdBQUcsTUFBTSxDQUFDLFdBQVcsQ0FBQyxLQUFLLElBQUksRUFBRTtvQkFDeEQsSUFBSTt3QkFDRixNQUFNLElBQUksQ0FBQyxZQUFZLEVBQUUsQ0FBQztxQkFDM0I7b0JBQUMsT0FBTyxLQUFLLEVBQUU7d0JBQ2QsYUFBYSxDQUFDLElBQUksQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDO3dCQUN6QyxJQUFJLENBQUMsTUFBTSxFQUFFLENBQUM7cUJBQ2Y7Z0JBQ0gsQ0FBQyxFQUFFLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxTQUFTLEdBQUcsSUFBSSxDQUFDLEdBQUcsd0JBQXdCLENBQUMsQ0FBQzthQUM5RDtRQUN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xuICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICBpZiAoIWlnbm9yZVJldm9rYXRpb25FcnJvcnMpIHtcbiAgICAgICAgdGhyb3cgZXJyb3JcbiAgICAgIH1cbiAgICB9XG5cbiAgICB0aGlzLmNvbWVzRnJvbUxvZ2luID0gZmFsc2U7XG5cbiAgICB0aGlzLnRva2VuID0gdW5kZWZpbmVkO1xuICAgIHRoaXMudXNlciA9IHVuZGVmaW5lZDtcblxuICAgIHRoaXMuY2FsbExpc3RlbmVycygpO1xuXG4gICAgcmV0dXJuIFN0b3JhZ2UucmVtb3ZlKHRoaXMuc3RvcmFnZUtleSk7XG4gIH07XG59XG4iXX0=

@@ -17,3 +17,2 @@ "use strict";

lastName: userJSON.family_name,
picture: userJSON.picture,
};

@@ -23,2 +22,2 @@ }

exports.default = OktaJS;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT2t0YUpTLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL09rdGFKUy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLGdFQUF5QztBQUt6QyxNQUFxQixNQUFPLFNBQVEscUJBQTBCO0lBQzVELFlBQVksUUFBZ0IsRUFBRSxTQUFpQixFQUFFLFdBQW1CO1FBQ2xFLEtBQUssQ0FBQyxRQUFRLEVBQUUsU0FBUyxFQUFFLFdBQVcsRUFBRSxZQUFZLENBQUMsQ0FBQztJQUN4RCxDQUFDO0lBR1MsWUFBWSxDQUFDLFFBQWE7UUFDbEMsT0FBTztZQUNMLEVBQUUsRUFBRSxRQUFRLENBQUMsR0FBRztZQUNoQixLQUFLLEVBQUUsUUFBUSxDQUFDLEtBQUs7WUFDckIsSUFBSSxFQUFFLFFBQVEsQ0FBQyxVQUFVO1lBQ3pCLFFBQVEsRUFBRSxRQUFRLENBQUMsV0FBVztZQUM5QixPQUFPLEVBQUUsUUFBUSxDQUFDLE9B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lbmNlL2FwaS9vaWRjLyN1c2VyaW5mb1xuICBwcm90ZWN0ZWQgbG9hZFVzZXJJbmZvKHVzZXJKU09OOiBhbnkpOiBPa3RhVXNlckluZm8ge1xuICAgIHJldHVybiB7XG4gICAgICBpZDogdXNlckpTT04uc3ViLFxuICAgICAgZW1haWw6IHVzZXJKU09OLmVtYWlsLFxuICAgICAgbmFtZTogdXNlckpTT04uZ2l2ZW5fbmFtZSxcbiAgICAgIGxhc3ROYW1lOiB1c2VySlNPTi5mYW1pbHlfbmFtZSxcbiAgICB9O1xuICB9XG59XG4iXX0=

@@ -13,3 +13,2 @@ export declare type Token = {

readonly lastName: string;
readonly picture: string;
readonly id: string;

@@ -16,0 +15,0 @@ };

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8vIFJlZmVyZW5jZTogaHR0cHM6Ly9pZGVudGl0eWRvY3MuYWthbWFpLmNvbS9ob21lL2F1dGhvcml6YXRpb24tY29kZS1wa2NlLWZvci1tb2JpbGUtYXBwc1xuZXhwb3J0IHR5cGUgVG9rZW4gPSB7XG4gIC8vIFRva2VuIHVzZWQgZm9yIGNhbGxzLCBzaG9ydCBleHBpcmF0aW9uXG4gIGFjY2Vzc1Rva2VuOiBzdHJpbmc7XG4gIC8vIFRva2VuIHVzZWQgdG8gcmV0cmlldmUgYSBuZXcgYWNjZXNzVG9rZW4sIGxvbmcgZXhwaXJhdGlvblxuICByZWZyZXNoVG9rZW46IHN0cmluZztcbiAgZXhwaXJlc0luOiBudW1iZXI7XG4gIHRva2VuVHlwZTogc3RyaW5nO1xuICAvLyBPSURDIHNjb3BlcyB0aGF0IHRoZSB0b2t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XRlLFxuICAgIH07XG4gIH1cbiAgdGhyb3cgRXJyb3IoJ1N0YXRlIGluIHVybCBkb2VzIG5vdCBtYXRjaCBsb2NhbGx5IHN0b3JlZCBzdGF0ZScpO1xufTsiXX0=
{
"name": "@mybiogen/auth-openid",
"version": "1.1.0",
"version": "1.1.1",
"description": "Authorization for OpenID",

@@ -35,3 +35,3 @@ "license": "MIT",

},
"gitHead": "399982b3b95d12078b00f64ebe45f4419108aa8c"
"gitHead": "abf713deb5b18b9d944e8c1f5bf820565dd381d4"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc