mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
refactor utils service to utils
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import { ConstantsService } from './constants.service';
|
||||
import { UtilsService } from './utils.service';
|
||||
|
||||
import { StorageService } from '../abstractions/storage.service';
|
||||
import { TokenService as TokenServiceAbstraction } from '../abstractions/token.service';
|
||||
|
||||
import { Utils } from '../misc/utils';
|
||||
|
||||
const Keys = {
|
||||
accessToken: 'accessToken',
|
||||
refreshToken: 'refreshToken',
|
||||
@@ -94,7 +95,7 @@ export class TokenService implements TokenServiceAbstraction {
|
||||
throw new Error('JWT must have 3 parts');
|
||||
}
|
||||
|
||||
const decoded = UtilsService.urlBase64Decode(parts[1]);
|
||||
const decoded = Utils.urlBase64Decode(parts[1]);
|
||||
if (decoded == null) {
|
||||
throw new Error('Cannot decode the token');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user