mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 18:53:29 +00:00
choose auth scheme based on token issuer
This commit is contained in:
@@ -214,6 +214,16 @@ function initTokenService() {
|
||||
return decoded.name;
|
||||
};
|
||||
|
||||
TokenService.prototype.getIssuer = function () {
|
||||
var decoded = this.decodeToken();
|
||||
|
||||
if (typeof decoded.iss === 'undefined') {
|
||||
throw 'No issuer found';
|
||||
}
|
||||
|
||||
return decoded.iss;
|
||||
};
|
||||
|
||||
function urlBase64Decode(str) {
|
||||
var output = str.replace(/-/g, '+').replace(/_/g, '/');
|
||||
switch (output.length % 4) {
|
||||
|
||||
Reference in New Issue
Block a user