mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-04 09:01:01 +01:00
fix callback for setUserIdAndEmail
This commit is contained in:
parent
cee9face7f
commit
6d89cc91f7
@ -52,7 +52,7 @@ class AuthService {
|
||||
await this.tokenService.setTokens(response.accessToken, response.refreshToken);
|
||||
await this.cryptoService.setKey(key);
|
||||
await this.cryptoService.setKeyHash(hashedPassword);
|
||||
await this.setUserIdAndEmail(this.tokenService.getUserId(), this.tokenService.getEmail());
|
||||
await this.userService.setUserIdAndEmail(this.tokenService.getUserId(), this.tokenService.getEmail());
|
||||
await this.cryptoService.setEncKey(response.key);
|
||||
await this.cryptoService.setEncPrivateKey(response.privateKey);
|
||||
|
||||
@ -63,12 +63,6 @@ class AuthService {
|
||||
};
|
||||
}
|
||||
|
||||
setUserIdAndEmail(userId: any, email: any) {
|
||||
return new Promise((resolve) => {
|
||||
return this.userService.setUserIdAndEmail(userId, email, resolve);
|
||||
});
|
||||
}
|
||||
|
||||
logOut(callback: Function) {
|
||||
this.$rootScope.vaultCiphers = null;
|
||||
this.$rootScope.vaultFolders = null;
|
||||
|
@ -15,7 +15,6 @@ export default class UserService {
|
||||
constructor(private tokenService: TokenService) {
|
||||
}
|
||||
|
||||
// TODO: fix callbacks
|
||||
setUserIdAndEmail(userId: string, email: string): Promise<any> {
|
||||
this.email = email;
|
||||
this.userId = userId;
|
||||
|
Loading…
Reference in New Issue
Block a user