@mybiogen/auth-openid
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -160,10 +160,18 @@ "use strict"; | ||
} | ||
const response = await fetch(this.userInfoEndpoint, { | ||
headers: new Headers({ | ||
Authorization: `Bearer ${this.token.accessToken}`, | ||
}), | ||
}); | ||
const userInfo = await response.json(); | ||
this.user = this.loadUserInfo(userInfo); | ||
return this.user; | ||
try { | ||
const response = await fetch(this.userInfoEndpoint, { | ||
headers: new Headers({ | ||
Authorization: `Bearer ${this.token.accessToken}`, | ||
}), | ||
}); | ||
const userInfo = await response.json(); | ||
this.user = this.loadUserInfo(userInfo); | ||
return this.user; | ||
} | ||
catch (error) { | ||
console.warn('Error getting user info, logging out...'); | ||
console.warn(error); | ||
await this.logout(true); | ||
return undefined; | ||
} | ||
}; | ||
@@ -291,2 +299,2 @@ this.revokeToken = async (tokenKey) => { | ||
exports.default = OpenIDClient; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT0F1dGhDbGllbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvT0F1dGhDbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxnRUFBdUM7QUFDdkMsK0JBQW9DO0FBQ3BDLG1DQUEwRztBQVUxRyxNQUE4QixZQUFZO0lBNkJ4QyxZQUFZLFFBQWdCLEVBQUUsU0FBaUIsRUFBRSxXQUFtQixFQUFFLFVBQWtCO1FBUnhGLGNBQVMsR0FBNkIsRUFBRSxDQUFDO1FBK0dqQyx3QkFBbUIsR0FBRyxHQUFTLEVBQUU7O1lBQ3ZDLElBQUksUUFBQyxJQUFJLENBQUMsS0FBSywwQ0FBRSxZQUFZLENBQUEsRUFBRTtnQkFDN0IsT0FBTyxDQUFDLElBQUksQ0FBQyx3QkFBd0IsQ0FBQyxDQUFBO2dCQUN0QyxPQUFPO2FBQ1I7WUFFRCxJQUFJLElBQUksQ0FBQyxJQ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ZS5vaykge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKCdUb2tlbiBub3QgcmV2b2tlZCcpO1xuICAgIH1cblxuICAgIHJldHVybiByZXNwb25zZS5vaztcbiAgfTtcblxuICBsb2dvdXQgPSBhc3luYyAoaWdub3JlUmV2b2thdGlvbkVycm9yczogYm9vbGVhbiA9IGZhbHNlKTogUHJvbWlzZTx2b2lkPiA9PiB7XG4gICAgaWYgKCF0aGlzLnRva2VuKSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ0Nhbm5vdCBsb2dvdXQgd2l0aG91dCB0b2tlbicpO1xuICAgIH1cblxuICAgIHRyeSB7XG4gICAgICBhd2FpdCBQcm9taXNlLmFsbChbXG4gICAgICAgIHRoaXMucmV2b2tlVG9rZW4odGhpcy50b2tlbi5hY2Nlc3NUb2tlbiksXG4gICAgICAgIHRoaXMucmV2b2tlVG9rZW4odGhpcy50b2tlbi5yZWZyZXNoVG9rZW4pLFxuICAgICAgXSk7XG4gICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgIGlmICghaWdub3JlUmV2b2thdGlvbkVycm9ycykge1xuICAgICAgICB0aHJvdyBlcnJvclxuICAgICAgfVxuICAgIH1cblxuICAgIHRoaXMuY29tZXNGcm9tTG9naW4gPSBmYWxzZTtcblxuICAgIHRoaXMudG9rZW4gPSB1bmRlZmluZWQ7XG4gICAgdGhpcy51c2VyID0gdW5kZWZpbmVkO1xuXG4gICAgdGhpcy5jYWxsTGlzdGVuZXJzKCk7XG5cbiAgICByZXR1cm4gU3RvcmFnZS5yZW1vdmUodGhpcy5zdG9yYWdlS2V5KTtcbiAgfTtcbn1cbiJdfQ== |
{ | ||
"name": "@mybiogen/auth-openid", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Authorization for OpenID", | ||
@@ -35,3 +35,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "abf713deb5b18b9d944e8c1f5bf820565dd381d4" | ||
"gitHead": "1ede7752abcff5d978074bb72899822e268063cb" | ||
} |
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
73755
607