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

@mybiogen/auth-openid

Package Overview
Dependencies
Maintainers
15
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 2.0.8 to 2.0.9

10

lib/OAuthClient.js

@@ -207,3 +207,3 @@ "use strict";

this.storage.set(this.storageKey + ".token", this.token);
this.storage.remove(currentState);
utils_1.Storage.remove(currentState);
window.history.replaceState({}, document.title, window.location.pathname);

@@ -297,3 +297,3 @@ return [2, this.token];

}));
_this.storage.set(state, {
utils_1.Storage.set(state, {
codeVerifier: codeVerifier,

@@ -426,4 +426,4 @@ originalCodeVerifier: originalCodeVerifier,

return [4, Promise.all([
utils_1.checkCallback(window.location.href, this.storageType),
this.storage.get(this.storageKey + ".token"),
utils_1.checkCallback(window.location.href),
utils_1.Storage.get(this.storageKey + ".token"),
])];

@@ -522,2 +522,2 @@ case 1:

exports.default = OpenIDClient;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT0F1dGhDbGllbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvT0F1dGhDbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDhEQUF1QztBQUN2Qyw2QkFBb0M7QUFDcEMsaUNBQTBHO0FBWTFHLHVEQUFzRDtBQUV0RDtJQTJDRSxzQkFBWSxRQUFnQixFQUFFLFNBQWlCLEVBQUUsV0FBbUIsRUFBRSxVQUFrQixFQUFFLGlCQUF5QixFQUFFLE1BQTZCLEVBQUUsTUFBZ0MsRUFBRSxXQUF5QztRQUEvTixpQkEwQ0M7UUExQ29ILHVCQUFBLEVBQUE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IHN0cmluZyk6IFByb21pc2U8dm9pZD4gPT4ge1xuICAgIHRoaXMuc3RvcmFnZS5yZW1vdmUoYCR7dGhpcy5zdG9yYWdlS2V5fS50b2tlbmApO1xuXG4gICAgaWYgKGVuZFNlc3Npb25VUkkpIHtcbiAgICAgIC8vIEphbnJhaW5KU1xuICAgICAgd2luZG93LmxvY2F0aW9uLnJlcGxhY2UoZW5kU2Vzc2lvblVSSSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIC8vIE9rdGFKU1xuICAgICAgY29uc3QgcGFyYW1zID0ge1xuICAgICAgICAnaWRfdG9rZW5faGludCc6IHRoaXMudG9rZW4/LmlkVG9rZW4sXG4gICAgICAgICdwb3N0X2xvZ291dF9yZWRpcmVjdF91cmknOiB0aGlzLmxvZ291dFJlZGlyZWN0VVJJLFxuICAgICAgfTtcbiAgICAgIGlmICh0aGlzLmVuZFNlc3Npb25FbmRwb2ludCkge1xuICAgICAgICBjb25zdCB1cmwgPSBgJHt0aGlzLmVuZFNlc3Npb25FbmRwb2ludH0/JHtxdWVyeVN0cmluZy5zdHJpbmdpZnkocGFyYW1zKX1gO1xuICAgICAgICB3aW5kb3cubG9jYXRpb24ucmVwbGFjZSh1cmwpO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxufVxuIl19

@@ -1,2 +0,1 @@

import { StorageType } from '../types';
declare type OauthParams = {

@@ -9,4 +8,4 @@ pkceCodeVerifier: string;

};
export declare const checkCallback: (url: string, storageType?: StorageType) => OauthParams | undefined;
export declare const checkCallback: (url: string) => OauthParams | undefined;
export {};
//# sourceMappingURL=checkCallback.d.ts.map

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

exports.checkCallback = void 0;
var CookieStorage_1 = require("./CookieStorage");
var Storage_1 = require("./Storage");

@@ -46,4 +45,3 @@ var query_string_1 = __importDefault(require("query-string"));

};
exports.checkCallback = function (url, storageType) {
if (storageType === void 0) { storageType = 'localStorage'; }
exports.checkCallback = function (url) {
var oauth = parseCallbackUrl(url);

@@ -53,4 +51,3 @@ if (!oauth) {

}
var storage = storageType === 'cookieStorage' ? CookieStorage_1.CookieStorage : Storage_1.Storage;
var storedState = storage.get(oauth.state);
var storedState = Storage_1.Storage.get(oauth.state);
if (storedState) {

@@ -67,2 +64,2 @@ return {

};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tDYWxsYmFjay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9jaGVja0NhbGxiYWNrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUNBLGlEQUFnRDtBQUNoRCxxQ0FBb0M7QUFDcEMsOERBQXVDO0FBZ0J2QyxJQUFNLGdCQUFnQixHQUFHLFVBQUMsR0FBVztJQUNuQyxJQUFNLFVBQVUsR0FBRyxHQUFHLENBQUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDO0lBRXBDLElBQUksVUFBVSxLQUFLLENBQUMsQ0FBQyxFQUFFO1FBQ3JCLElBQU0sYUFBVyxHQUE0QjtZQUMzQyxJQUFJLEVBQUUsU0FBUztZQUNmLE1BQU0sRUFBRSxHQUFHLENBQUMsU0FBUyxDQUFDLENBQUMsRUFBRSxVQUFVLENBQUM7WUFDcEMsS0FBSyxFQUFFLFNBQVM7U0FDakIsQ0FBQztRQUNGLElBQU0sS0FBSyxHQUFHLEdBQUcsQ0FBQyxTQUFTLENBQUMsVUFBVSxHQUFHLENBQUMsRUFBRSxHQUFHLENBQUMsTUFBTSxDQUFDLENBQUM7UUFDeEQsSUFBTSxXQUFXLEdBQUcsc0JBQVcsQ0FBQyxLQUFLLENBQUMsS0FBSyxDQUFDLENBQUM7UUFFN0MsSUFBTSxhQUFXLEdBQTRELEVBQUUsQ0FBQztRQUNoRixNQUFNLENBQUMsT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxVQUFDLEVBQXNCO2dC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pbmcuc3RyaW5naWZ5KG90aGVyUGFyYW1zKX1gO1xuICAgIH1cblxuICAgIGlmIChvYXV0aFBhcmFtcy5jb2RlICYmIG9hdXRoUGFyYW1zLnN0YXRlKSB7XG4gICAgICByZXR1cm4gb2F1dGhQYXJhbXMgYXMgQ2FsbGJhY2tQYXJhbXM7XG4gICAgfVxuICAgIHJldHVybiB1bmRlZmluZWQ7XG4gIH1cblxuICByZXR1cm4gdW5kZWZpbmVkO1xufTtcblxuZXhwb3J0IGNvbnN0IGNoZWNrQ2FsbGJhY2sgPSAodXJsOiBzdHJpbmcpOiBPYXV0aFBhcmFtcyB8IHVuZGVmaW5lZCA9PiB7XG4gIGNvbnN0IG9hdXRoID0gcGFyc2VDYWxsYmFja1VybCh1cmwpO1xuXG4gIGlmICghb2F1dGgpIHtcbiAgICByZXR1cm4gdW5kZWZpbmVkO1xuICB9XG5cbiAgY29uc3Qgc3RvcmVkU3RhdGUgPSBTdG9yYWdlLmdldChvYXV0aC5zdGF0ZSk7XG5cbiAgaWYgKHN0b3JlZFN0YXRlKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgIHBrY2VDb2RlVmVyaWZpZXI6IHN0b3JlZFN0YXRlLm9yaWdpbmFsQ29kZVZlcmlmaWVyLFxuICAgICAgcmVkaXJlY3RUbzogc3RvcmVkU3RhdGUucmVkaXJlY3RUbyxcbiAgICAgIGNvZGU6IG9hdXRoLmNvZGUsXG4gICAgICBuZXdVcmw6IG9hdXRoLm5ld1VybCxcbiAgICAgIGN1cnJlbnRTdGF0ZTogb2F1dGguc3RhdGUsXG4gICAgfTtcbiAgfVxuICB0aHJvdyBFcnJvcignU3RhdGUgaW4gdXJsIGRvZXMgbm90IG1hdGNoIGxvY2FsbHkgc3RvcmVkIHN0YXRlJyk7XG59OyJdfQ==
{
"name": "@mybiogen/auth-openid",
"version": "2.0.8",
"version": "2.0.9",
"description": "Authorization for OpenID",

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

},
"gitHead": "926e69b4a6705af5a0421cfd2c96b9364951f974"
"gitHead": "27e850106d7f7614f835e526c4f3feea9ce627e6"
}

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