@mybiogen/auth-openid
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -31,2 +31,3 @@ import { Storage } from './utils'; | ||
hasBeenInitialized: boolean; | ||
storageType: StorageType; | ||
constructor(clientId: string, configUrl: string, redirectURI: string, storageKey: string, logoutRedirectURI: string, scopes?: string[], claims?: Array<keyof Claims>, storageType?: StorageType); | ||
@@ -33,0 +34,0 @@ init(): Promise<Init | undefined>; |
@@ -407,2 +407,3 @@ "use strict"; | ||
} | ||
this.storageType = storageType; | ||
if (storageType === 'localStorage') { | ||
@@ -432,3 +433,3 @@ this.storage = utils_1.Storage; | ||
return [4, Promise.all([ | ||
utils_1.checkCallback(window.location.href), | ||
utils_1.checkCallback(window.location.href, this.storageType), | ||
this.storage.get(this.storageKey + ".token"), | ||
@@ -528,2 +529,2 @@ ])]; | ||
exports.default = OpenIDClient; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT0F1dGhDbGllbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvT0F1dGhDbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDhEQUF1QztBQUN2Qyw2QkFBb0M7QUFDcEMsaUNBQTBHO0FBWTFHLHVEQUFzRDtBQUV0RDtJQXlDRSxzQkFBWSxRQUFnQixFQUFFLFNBQWlCLEVBQUUsV0FBbUIsRUFBRSxVQUFrQixFQUFFLGlCQUF5QixFQUFFLE1BQTZCLEVBQUUsTUFBZ0MsRUFBRSxXQUF5QztRQUEvTixpQkF3Q0M7UUF4Q29ILHVCQUFBLEVBQUEsVUFBb0IsUUFBUSxDQUFDO1FBQUUsdUJBQUEsRUFBQSxXQUFnQztRQUFFLDRCQUFBLEVBQUEsNEJBQXlDO1FBVi9OLGNBQVMsR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ZG93LmxvY2F0aW9uLnJlcGxhY2UodXJsKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG5cbn1cbiJdfQ== |
@@ -0,1 +1,2 @@ | ||
import { StorageType } from '../types'; | ||
declare type OauthParams = { | ||
@@ -8,4 +9,4 @@ pkceCodeVerifier: string; | ||
}; | ||
export declare const checkCallback: (url: string) => OauthParams | undefined; | ||
export declare const checkCallback: (url: string, storageType?: StorageType) => OauthParams | undefined; | ||
export {}; | ||
//# sourceMappingURL=checkCallback.d.ts.map |
@@ -7,2 +7,3 @@ "use strict"; | ||
exports.checkCallback = void 0; | ||
var CookieStorage_1 = require("./CookieStorage"); | ||
var Storage_1 = require("./Storage"); | ||
@@ -45,3 +46,4 @@ var query_string_1 = __importDefault(require("query-string")); | ||
}; | ||
exports.checkCallback = function (url) { | ||
exports.checkCallback = function (url, storageType) { | ||
if (storageType === void 0) { storageType = 'localStorage'; } | ||
var oauth = parseCallbackUrl(url); | ||
@@ -51,3 +53,4 @@ if (!oauth) { | ||
} | ||
var storedState = Storage_1.Storage.get(oauth.state); | ||
var storage = storageType === 'cookieStorage' ? CookieStorage_1.CookieStorage : Storage_1.Storage; | ||
var storedState = storage.get(oauth.state); | ||
if (storedState) { | ||
@@ -64,2 +67,2 @@ return { | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tDYWxsYmFjay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlscy9jaGVja0NhbGxiYWNrLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLHFDQUFvQztBQUNwQyw4REFBdUM7QUFnQnZDLElBQU0sZ0JBQWdCLEdBQUcsVUFBQyxHQUFXO0lBQ25DLElBQU0sVUFBVSxHQUFHLEdBQUcsQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLENBQUM7SUFFcEMsSUFBSSxVQUFVLE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mdldChvYXV0aC5zdGF0ZSk7XG5cbiAgaWYgKHN0b3JlZFN0YXRlKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgIHBrY2VDb2RlVmVyaWZpZXI6IHN0b3JlZFN0YXRlLm9yaWdpbmFsQ29kZVZlcmlmaWVyLFxuICAgICAgcmVkaXJlY3RUbzogc3RvcmVkU3RhdGUucmVkaXJlY3RUbyxcbiAgICAgIGNvZGU6IG9hdXRoLmNvZGUsXG4gICAgICBuZXdVcmw6IG9hdXRoLm5ld1VybCxcbiAgICAgIGN1cnJlbnRTdGF0ZTogb2F1dGguc3RhdGUsXG4gICAgfTtcbiAgfVxuICB0aHJvdyBFcnJvcignU3RhdGUgaW4gdXJsIGRvZXMgbm90IG1hdGNoIGxvY2FsbHkgc3RvcmVkIHN0YXRlJyk7XG59OyJdfQ== |
{ | ||
"name": "@mybiogen/auth-openid", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"description": "Authorization for OpenID", | ||
@@ -37,3 +37,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "615e1bb8a97adb87917afaa8cbefadc633724be1" | ||
"gitHead": "8cfaf163c3197089971732db38e11d735c20f634" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
113761
995