@mybiogen/auth-openid
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -1,3 +0,5 @@ | ||
export { default } from './JanrainJS'; | ||
export { default as JanrainJS } from './JanrainJS'; | ||
export { default as OktaJS } from './OktaJS'; | ||
export { default } from './OAuthClient'; | ||
export * from './types'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -14,4 +14,8 @@ "use strict"; | ||
var JanrainJS_1 = require("./JanrainJS"); | ||
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return JanrainJS_1.default; } }); | ||
Object.defineProperty(exports, "JanrainJS", { enumerable: true, get: function () { return JanrainJS_1.default; } }); | ||
var OktaJS_1 = require("./OktaJS"); | ||
Object.defineProperty(exports, "OktaJS", { enumerable: true, get: function () { return OktaJS_1.default; } }); | ||
var OAuthClient_1 = require("./OAuthClient"); | ||
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return OAuthClient_1.default; } }); | ||
__exportStar(require("./types"), exports); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEseUNBQXNDO0FBQTdCLG9HQUFBLE9BQU8sT0FBQTtBQUNoQiwwQ0FBd0IiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBkZWZhdWx0IH0gZnJvbSAnLi9KYW5yYWluSlMnO1xuZXhwb3J0ICogZnJvbSAnLi90eXBlcyc7Il19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBQUEseUNBQW1EO0FBQTFDLHNHQUFBLE9BQU8sT0FBYTtBQUM3QixtQ0FBNkM7QUFBcEMsZ0dBQUEsT0FBTyxPQUFVO0FBQzFCLDZDQUF3QztBQUEvQixzR0FBQSxPQUFPLE9BQUE7QUFDaEIsMENBQXdCIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHsgZGVmYXVsdCBhcyBKYW5yYWluSlMgfSBmcm9tICcuL0phbnJhaW5KUyc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIE9rdGFKUyB9IGZyb20gJy4vT2t0YUpTJztcbmV4cG9ydCB7IGRlZmF1bHQgfSBmcm9tICcuL09BdXRoQ2xpZW50JztcbmV4cG9ydCAqIGZyb20gJy4vdHlwZXMnOyJdfQ== |
@@ -1,31 +0,8 @@ | ||
import { JanrainUserInfo, Token, WatchAuthCallback, Init } from './types'; | ||
declare class JanrainJS { | ||
clientId: string; | ||
configUrl: string; | ||
redirectURI: string; | ||
authorizationEndpoint?: string; | ||
tokenEndpoint?: string; | ||
userInfoEndpoint?: string; | ||
revocationEndpoint?: string; | ||
token?: Token; | ||
user?: JanrainUserInfo; | ||
storageKey: string; | ||
listeners: Array<WatchAuthCallback>; | ||
refreshTokenInterval?: number; | ||
comesFromLogin: boolean; | ||
import OpenIDClient from './OAuthClient'; | ||
import { OAuthUserInfo } from './types'; | ||
export declare type JanrainUserInfo = OAuthUserInfo; | ||
export default class JanrainJS extends OpenIDClient<JanrainUserInfo> { | ||
constructor(clientId: string, configUrl: string, redirectURI: string); | ||
init(): Promise<Init | undefined>; | ||
private callListeners; | ||
private keepRefreshingToken; | ||
watchAuth: (cb: WatchAuthCallback) => Promise<void>; | ||
private fetchConfig; | ||
private setConfig; | ||
private getToken; | ||
refreshToken: () => Promise<Init | undefined>; | ||
login: () => void; | ||
getUserInfo: () => Promise<JanrainUserInfo | undefined>; | ||
private revokeToken; | ||
logout: () => Promise<void>; | ||
protected loadUserInfo(userJSON: any): JanrainUserInfo; | ||
} | ||
export default JanrainJS; | ||
//# sourceMappingURL=JanrainJS.d.ts.map |
@@ -6,284 +6,18 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const query_string_1 = __importDefault(require("query-string")); | ||
const uuid_1 = require("uuid"); | ||
const utils_1 = require("./utils"); | ||
class JanrainJS { | ||
const OAuthClient_1 = __importDefault(require("./OAuthClient")); | ||
class JanrainJS extends OAuthClient_1.default { | ||
constructor(clientId, configUrl, redirectURI) { | ||
this.storageKey = 'janrain_token'; | ||
this.listeners = []; | ||
this.keepRefreshingToken = () => { | ||
if (this.user && this.token && !this.refreshTokenInterval) { | ||
const SAFETY_GAP_REFRESH_TOKEN = 60000; | ||
this.refreshTokenInterval = window.setInterval(async () => { | ||
try { | ||
await this.refreshToken(); | ||
} | ||
catch (error) { | ||
clearInterval(this.refreshTokenInterval); | ||
this.logout(); | ||
} | ||
}, (this.token.expiresIn * 1000) - SAFETY_GAP_REFRESH_TOKEN); | ||
} | ||
super(clientId, configUrl, redirectURI, 'janrain_token'); | ||
} | ||
loadUserInfo(userJSON) { | ||
return { | ||
id: userJSON.sub, | ||
email: userJSON.email, | ||
name: userJSON.given_name, | ||
lastName: userJSON.family_name, | ||
picture: userJSON.picture, | ||
}; | ||
this.watchAuth = async (cb) => { | ||
this.listeners.push(cb); | ||
const token = await this.init(); | ||
if (token) { | ||
await this.getUserInfo(); | ||
} | ||
this.callListeners(); | ||
}; | ||
this.fetchConfig = async () => { | ||
try { | ||
const response = await fetch(this.configUrl); | ||
return response.json(); | ||
} | ||
catch (error) { | ||
return undefined; | ||
} | ||
}; | ||
this.setConfig = async () => { | ||
const config = await this.fetchConfig(); | ||
if (config) { | ||
this.authorizationEndpoint = config.authorization_endpoint; | ||
this.tokenEndpoint = config.token_endpoint; | ||
this.userInfoEndpoint = config.userinfo_endpoint; | ||
this.revocationEndpoint = config.revocation_endpoint; | ||
} | ||
}; | ||
this.getToken = async (code, originalCodeVerifier, currentState) => { | ||
const body = { | ||
grant_type: 'authorization_code', | ||
code, | ||
client_id: encodeURIComponent(this.clientId), | ||
redirect_uri: this.redirectURI, | ||
code_verifier: originalCodeVerifier, | ||
}; | ||
const config = { | ||
method: 'POST', | ||
headers: new Headers({ | ||
'Content-Type': 'application/x-www-form-urlencoded', | ||
}), | ||
body: utils_1.encodeBody(body), | ||
}; | ||
if (this.tokenEndpoint) { | ||
try { | ||
const response = await fetch(this.tokenEndpoint, config); | ||
if (response.ok) { | ||
const janrainToken = await response.json(); | ||
this.token = { | ||
accessToken: janrainToken.access_token, | ||
refreshToken: janrainToken.refresh_token, | ||
expiresIn: janrainToken.expires_in, | ||
tokenType: janrainToken.token_type, | ||
scope: janrainToken.scope, | ||
idToken: janrainToken.id_token, | ||
}; | ||
utils_1.Storage.set(this.storageKey, this.token); | ||
utils_1.Storage.remove(currentState); | ||
window.history.replaceState({}, document.title, window.location.pathname); | ||
return this.token; | ||
} | ||
return undefined; | ||
} | ||
catch (error) { | ||
throw new Error('Error getting token'); | ||
} | ||
} | ||
else { | ||
throw new Error('Not initialized. Token endpoint not present'); | ||
} | ||
}; | ||
this.refreshToken = async () => { | ||
try { | ||
if (this.token && this.tokenEndpoint) { | ||
const body = { | ||
grant_type: 'refresh_token', | ||
refresh_token: this.token.refreshToken, | ||
redirect_uri: this.redirectURI, | ||
client_id: encodeURIComponent(this.clientId), | ||
}; | ||
const config = { | ||
method: 'POST', | ||
headers: new Headers({ | ||
'Content-Type': 'application/x-www-form-urlencoded', | ||
}), | ||
body: utils_1.encodeBody(body), | ||
}; | ||
const response = await fetch(this.tokenEndpoint, config); | ||
if (response.ok) { | ||
const janrainToken = await response.json(); | ||
this.token = { | ||
accessToken: janrainToken.access_token, | ||
refreshToken: janrainToken.refresh_token, | ||
expiresIn: janrainToken.expires_in, | ||
tokenType: janrainToken.token_type, | ||
scope: janrainToken.scope, | ||
idToken: janrainToken.id_token, | ||
}; | ||
utils_1.Storage.set(this.storageKey, this.token); | ||
return this.token | ||
? { accessToken: this.token.accessToken, expiresIn: this.token.expiresIn } | ||
: undefined; | ||
} | ||
throw new Error('Token not refreshed'); | ||
} | ||
throw new Error('Cannot refresh token without token or endpoint'); | ||
} | ||
catch (error) { | ||
throw error; | ||
} | ||
}; | ||
this.login = () => { | ||
const originalCodeVerifier = utils_1.generateCodeVerifier(96); | ||
const codeVerifier = utils_1.generatePkceChallenge(originalCodeVerifier); | ||
const state = uuid_1.v4(); | ||
const params = { | ||
client_id: encodeURIComponent(this.clientId), | ||
redirect_uri: this.redirectURI, | ||
scope: 'openid email profile', | ||
response_type: 'code', | ||
response_mode: 'query', | ||
state: encodeURIComponent(state), | ||
code_challenge: encodeURI(codeVerifier), | ||
code_challenge_method: 'S256', | ||
}; | ||
utils_1.Storage.set(state, { | ||
codeVerifier, | ||
originalCodeVerifier, | ||
}); | ||
const loginQuery = query_string_1.default.stringify(params); | ||
const url = `${this.authorizationEndpoint}?${loginQuery}`; | ||
window.location.replace(url); | ||
}; | ||
this.getUserInfo = async () => { | ||
if (this.userInfoEndpoint && this.token) { | ||
const response = await fetch(this.userInfoEndpoint, { | ||
headers: new Headers({ | ||
Authorization: `Bearer ${this.token.accessToken}`, | ||
}), | ||
}); | ||
const userInfo = await response.json(); | ||
this.user = { | ||
id: userInfo.sub, | ||
email: userInfo.email, | ||
name: userInfo.given_name, | ||
lastName: userInfo.family_name, | ||
picture: userInfo.picture, | ||
}; | ||
return this.user; | ||
} | ||
return undefined; | ||
}; | ||
this.revokeToken = async (tokenKey) => { | ||
try { | ||
if (this.token && this.revocationEndpoint) { | ||
const body = { | ||
token: tokenKey, | ||
client_id: encodeURIComponent(this.clientId), | ||
}; | ||
const config = { | ||
method: 'POST', | ||
headers: new Headers({ | ||
'Content-Type': 'application/x-www-form-urlencoded', | ||
Authorization: `Bearer ${tokenKey}`, | ||
}), | ||
body: utils_1.encodeBody(body), | ||
}; | ||
const response = await fetch(this.revocationEndpoint, config); | ||
if (response.ok) { | ||
return response.ok; | ||
} | ||
throw new Error('Token not revoked'); | ||
} | ||
throw new Error('Cannot revoke token without token or endpoint'); | ||
} | ||
catch (error) { | ||
throw error; | ||
} | ||
}; | ||
this.logout = async () => { | ||
try { | ||
if (this.token) { | ||
const [revokedAccessToken, revokedRefreshToken] = await Promise.all([ | ||
this.revokeToken(this.token.accessToken), | ||
this.revokeToken(this.token.refreshToken), | ||
]); | ||
this.comesFromLogin = false; | ||
this.token = undefined; | ||
this.user = undefined; | ||
if (revokedAccessToken && revokedRefreshToken) { | ||
this.callListeners(); | ||
return utils_1.Storage.remove(this.storageKey); | ||
} | ||
throw new Error('Token not removed from storage'); | ||
} | ||
throw new Error('Cannot logout without token'); | ||
} | ||
catch (error) { | ||
throw error; | ||
} | ||
}; | ||
if (!clientId) { | ||
throw new Error('clientId is not provided.'); | ||
} | ||
this.clientId = clientId; | ||
if (!configUrl) { | ||
throw new Error('configUrl is not provided.'); | ||
} | ||
this.configUrl = configUrl; | ||
if (!redirectURI) { | ||
throw new Error('redirectUri is not provided.'); | ||
} | ||
this.redirectURI = redirectURI; | ||
this.comesFromLogin = false; | ||
} | ||
async init() { | ||
const [callbackState, storageOauth] = await Promise.all([ | ||
utils_1.checkCallback(window.location.href), | ||
utils_1.Storage.get(this.storageKey), | ||
]); | ||
if (!callbackState && !storageOauth) { | ||
this.setConfig(); | ||
return undefined; | ||
} | ||
await this.setConfig(); | ||
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; | ||
} | ||
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 undefined; | ||
} | ||
callListeners() { | ||
this.listeners.forEach((cb) => { | ||
if (this.token && this.user) { | ||
cb({ ...this.user }, this.comesFromLogin); | ||
} | ||
else { | ||
cb(undefined, this.comesFromLogin); | ||
} | ||
}); | ||
} | ||
} | ||
exports.default = JanrainJS; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSmFucmFpbkpTLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL0phbnJhaW5KUy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLGdFQUF1QztBQUN2QywrQkFBb0M7QUFDcEMsbUNBQTBHO0FBUzFHLE1BQU0sU0FBUztJQTJCYixZQUFZLFFBQWdCLEVBQUUsU0FBaUIsRUFBRSxXQUFtQjtRQVJwRSxlQUFVLEdBQUcsZUFBZSxDQUFDO1FBRTdCLGNBQVMsR0FBNkIsRUFBRSxDQUFDO1FBMkVqQyx3QkFBbUIsR0FBRyxHQUFTLEVBQUU7WUFDdkMsSUFBSSxJQUFJLENBQUMsSUFBSSxJQUFJLElBQUksQ0FBQyxLQUFLLElBQUksQ0FBQyxJQUFJLENBQUMsb0JBQW9CLEVBQUU7Z0JBQ3pELE1BQU0sd0JBQXdCLEdBQUcsS0FBSyxDQUFDO2dCQUN2QyxJQUFJLENBQUMsb0JBQW9CLEdBQUcsTUFBTSxDQUFDLFdBQVcsQ0FBQyxLQUFLLElBQUksRUFBRTtvQkFDeEQsSUFBSTt3QkFDRixNQUFNLElBQUksQ0FBQyxZQUFZLEVBQUUsQ0FBQztxQkFDM0I7b0JBQUMsT0FBTyxLQUFLLEVBQUU7d0JBQ2QsYUFBYSxDQUFDLElBQUksQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDO3dCQUN6QyxJQUFJLENBQUMsTUFBTSxFQUFFLENBQUM7cUJBQ2Y7Z0JBQ0gsQ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ICAgICB0aHJvdyBuZXcgRXJyb3IoJ05vdCBpbml0aWFsaXplZC4gVG9rZW4gZW5kcG9pbnQgbm90IHByZXNlbnQnKTtcbiAgICB9XG4gIH07XG5cbiAgcmVmcmVzaFRva2VuID0gYXN5bmMgKCk6IFByb21pc2U8SW5pdCB8IHVuZGVmaW5lZD4gPT4ge1xuICAgIHRyeSB7XG4gICAgICBpZiAodGhpcy50b2tlbiAmJiB0aGlzLnRva2VuRW5kcG9pbnQpIHtcbiAgICAgICAgY29uc3QgYm9keSA9IHtcbiAgICAgICAgICBncmFudF90eXBlOiAncmVmcmVzaF90b2tlbicsXG4gICAgICAgICAgcmVmcmVzaF90b2tlbjogdGhpcy50b2tlbi5yZWZyZXNoVG9rZW4sXG4gICAgICAgICAgcmVkaXJlY3RfdXJpOiB0aGlzLnJlZGlyZWN0VVJJLFxuICAgICAgICAgIGNsaWVudF9pZDogZW5jb2RlVVJJQ29tcG9uZW50KHRoaXMuY2xpZW50SWQpLFxuICAgICAgICB9O1xuICAgICAgICBjb25zdCBjb25maWcgPSB7XG4gICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXG4gICAgICAgICAgaGVhZGVyczogbmV3IEhlYWRlcnMoe1xuICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZSc6ICdhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQnLFxuICAgICAgICAgIH0pLFxuICAgICAgICAgIGJvZHk6IGVuY29kZUJvZHkoYm9keSksXG4gICAgICAgIH07XG4gICAgICAgIGNvbnN0IHJlc3BvbnNlID0gYXdhaXQgZmV0Y2godGhpcy50b2tlbkVuZHBvaW50LCBjb25maWcpO1xuICAgICAgICBpZiAocmVzcG9uc2Uub2spIHtcbiAgICAgICAgICBjb25zdCBqYW5yYWluVG9rZW4gPSBhd2FpdCByZXNwb25zZS5qc29uKCk7XG4gICAgICAgICAgdGhpcy50b2tlbiA9IHtcbiAgICAgICAgICAgIGFjY2Vzc1Rva2VuOiBqYW5yY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ZXJzKHtcbiAgICAgICAgICBBdXRob3JpemF0aW9uOiBgQmVhcmVyICR7dGhpcy50b2tlbi5hY2Nlc3NUb2tlbn1gLFxuICAgICAgICB9KSxcbiAgICAgIH0pO1xuICAgICAgY29uc3QgdXNlckluZm8gPSBhd2FpdCByZXNwb25zZS5qc29uKCk7XG4gICAgICB0aGlzLnVzZXIgPSB7XG4gICAgICAgIGlkOiB1c2VySW5mby5zdWIsXG4gICAgICAgIGVtYWlsOiB1c2VySW5mby5lbWFpbCxcbiAgICAgICAgbmFtZTogdXNlckluZm8uZ2l2ZW5fbmFtZSxcbiAgICAgICAgbGFzdE5hbWU6IHVzZXJJbmZvLmZhbWlseV9uYW1lLFxuICAgICAgICBwaWN0dXJlOiB1c2VySW5mby5waWN0dXJlLFxuICAgICAgfTtcbiAgICAgIHJldHVybiB0aGlzLnVzZXI7XG4gICAgfVxuICAgIHJldHVybiB1bmRlZmluZWQ7XG4gIH07XG5cbiAgcHJpdmF0ZSByZXZva2VUb2tlbiA9IGFzeW5jICh0b2tlbktleTogc3RyaW5nKTogUHJvbWlzZTxib29sZWFuPiA9PiB7XG4gICAgdHJ5IHtcbiAgICAgIGlmICh0aGlzLnRva2VuICYmIHRoaXMucmV2b2NhdGlvbkVuZHBvaW50KSB7XG4gICAgICAgIGNvbnN0IGJvZHkgPSB7XG4gICAgICAgICAgdG9rZW46IHRva2VuS2V5LFxuICAgICAgICAgIGNsaWVudF9pZDogZW5jb2RlVVJJQ29tcG9uZW50KHRoaXMuY2xpZW50SWQpLFxuICAgICAgICB9O1xuICAgICAgICBjb25zdCBjb25maWcgPSB7XG4gICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXG4gICAgICAgICAgaGVhZGVyczogbmV3IEhlYWRlcnMoe1xuICAgICAgICAgICAgJ0NvbnRlbnQtVHlwZSc6ICdhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQnLFxuICAgICAgICAgICAgQXV0aG9yaXphdGlvbjogYEJlYXJ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M7Q0FDRjtBQWZELDRCQWVDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IE9wZW5JRENsaWVudCBmcm9tICcuL09BdXRoQ2xpZW50JztcbmltcG9ydCB7IE9BdXRoVXNlckluZm8gfSBmcm9tICcuL3R5cGVzJztcblxuZXhwb3J0IHR5cGUgSmFucmFpblVzZXJJbmZvID0gT0F1dGhVc2VySW5mb1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBKYW5yYWluSlMgZXh0ZW5kcyBPcGVuSURDbGllbnQ8SmFucmFpblVzZXJJbmZvPiB7XG4gIGNvbnN0cnVjdG9yKGNsaWVudElkOiBzdHJpbmcsIGNvbmZpZ1VybDogc3RyaW5nLCByZWRpcmVjdFVSSTogc3RyaW5nKSB7XG4gICAgc3VwZXIoY2xpZW50SWQsIGNvbmZpZ1VybCwgcmVkaXJlY3RVUkksICdqYW5yYWluX3Rva2VuJyk7XG4gIH1cblxuICAvLyBodHRwczovL2lkZW50aXR5ZG9jcy5ha2FtYWkuY29tL2hvbWUvamFucmFpbi1lbnRpdHktYXBpXG4gIHByb3RlY3RlZCBsb2FkVXNlckluZm8odXNlckpTT046IGFueSk6IEphbnJhaW5Vc2VySW5mbyB7XG4gICAgcmV0dXJuIHtcbiAgICAgIGlkOiB1c2VySlNPTi5zdWIsXG4gICAgICBlbWFpbDogdXNlckpTT04uZW1haWwsXG4gICAgICBuYW1lOiB1c2VySlNPTi5naXZlbl9uYW1lLFxuICAgICAgbGFzdE5hbWU6IHVzZXJKU09OLmZhbWlseV9uYW1lLFxuICAgICAgcGljdHVyZTogdXNlckpTT04ucGljdHVyZSxcbiAgICB9O1xuICB9XG59XG4iXX0= |
@@ -9,3 +9,3 @@ export declare type Token = { | ||
}; | ||
export declare type JanrainUserInfo = { | ||
export declare type OAuthUserInfo = { | ||
readonly email: string; | ||
@@ -17,3 +17,3 @@ readonly name: string; | ||
}; | ||
export declare type WatchAuthCallback = (user: JanrainUserInfo | undefined, comesFromLogin: boolean) => void; | ||
export declare type WatchAuthCallback = (user: OAuthUserInfo | undefined, comesFromLogin: boolean) => void; | ||
export declare type Init = { | ||
@@ -20,0 +20,0 @@ accessToken: string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8vIFJlZmVyZW5jZTogaHR0cHM6Ly9pZGVudGl0eWRvY3MuYWthbWFpLmNvbS9ob21lL2F1dGhvcml6YXRpb24tY29kZS1wa2NlLWZvci1tb2JpbGUtYXBwc1xuZXhwb3J0IHR5cGUgVG9rZW4gPSB7XG4gIC8vIFRva2VuIHVzZWQgZm9yIGNhbGxzLCBzaG9ydCBleHBpcmF0aW9uXG4gIGFjY2Vzc1Rva2VuOiBzdHJpbmc7XG4gIC8vIFRva2VuIHVzZWQgdG8gcmV0cmlldmUgYSBuZXcgYWNjZXNzVG9rZW4sIGxvbmcgZXhwaXJhdGlvblxuICByZWZyZXNoVG9rZW46IHN0cmluZztcbiAgZXhwaXJlc0luOiBudW1iZXI7XG4gIHRva2VuVHlwZTogc3RyaW5nO1xuICAvLyBPSURDIHNjb3BlcyB0aGF0IHRoZSB0b2tlbiBoYXMgYWNjZXNzIHRvIHJldHJpZXZlXG4gIHNjb3BlOiBzdHJpbmc7XG4gIC8vIElkZW50aXR5IHRva2VuXG4gIGlkVG9rZW46IHN0cmluZ1xufTtcblxuZXhwb3J0IHR5cGUgSmFucmFpblVzZXJJbmZvID0ge1xuICByZWFkb25seSBlbWFpbDogc3RyaW5nO1xuICByZWFkb25seSBuYW1lOiBzdHJpbmc7XG4gIHJlYWRvbmx5IGxhc3ROYW1lOiBzdHJpbmc7XG4gIHJlYWRvbmx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0cmluZztcbiAgZXhwaXJlc0luOiBudW1iZXI7XG4gIHRva2VuVHlwZTogc3RyaW5nO1xuICAvLyBPSURDIHNjb3BlcyB0aGF0IHRoZSB0b2tlbiBoYXMgYWNjZXNzIHRvIHJldHJpZXZlXG4gIHNjb3BlOiBzdHJpbmc7XG4gIC8vIElkZW50aXR5IHRva2VuXG4gIGlkVG9rZW46IHN0cmluZ1xufTtcblxuZXhwb3J0IHR5cGUgT0F1dGhVc2VySW5mbyA9IHtcbiAgcmVhZG9ubHkgZW1haWw6IHN0cmluZztcbiAgcmVhZG9ubHkgbmFtZTogc3RyaW5nO1xuICByZWFkb25seSBsYXN0TmFtZTogc3RyaW5nO1xuICByZWFkb25seSBwaWN0dXJlOiBzdHJpbmc7XG4gIHJlYWRvbmx5IGlkOiBzdHJpbmc7XG59O1xuXG5leHBvcnQgdHlwZSBXYXRjaEF1dGhDYWxsYmFjayA9ICh1c2VyOiBPQXV0aFVzZXJJbmZvIHwgdW5kZWZpbmVkLCBjb21lc0Zyb21Mb2dpbjogYm9vbGVhbikgPT4gdm9pZDtcblxuZXhwb3J0IHR5cGUgSW5pdCA9IHtcbiAgYWNjZXNzVG9rZW46IHN0cmluZztcbiAgZXhwaXJlc0luOiBudW1iZXI7XG59O1xuXG5leHBvcnQgdHlwZSBDb25maWdFbmRwb2ludCA9IHtcbiAgYXV0aG9yaXphdGlvbl9lbmRwb2ludDogc3RyaW5nO1xuICB0b2tlbl9lbmRwb2ludDogc3RyaW5nO1xuICB1c2VyaW5mb19lbmRwb2ludDogc3RyaW5nO1xuICByZXZvY2F0aW9uX2VuZHBvaW50OiBzdHJpbmc7XG59OyJdfQ== |
{ | ||
"name": "@mybiogen/auth-openid", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Authorization for OpenID", | ||
@@ -35,3 +35,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "0134124240b8735dda29196b6d57a4c4db921f6c" | ||
"gitHead": "399982b3b95d12078b00f64ebe45f4419108aa8c" | ||
} |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
70539
36
571
7