mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
add auth-email header (#394)
This commit is contained in:
parent
25a91313ad
commit
ca61e13b57
@ -73,4 +73,10 @@ export class TokenRequest {
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
alterIdentityTokenHeaders(headers: Headers) {
|
||||
if (this.clientSecret == null && this.masterPasswordHash != null && this.email != null) {
|
||||
headers.set('Auth-Email', this.email);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -206,6 +206,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
if (this.customUserAgent != null) {
|
||||
headers.set('User-Agent', this.customUserAgent);
|
||||
}
|
||||
request.alterIdentityTokenHeaders(headers);
|
||||
const response = await this.fetch(new Request(this.identityBaseUrl + '/connect/token', {
|
||||
body: this.qsStringify(request.toIdentityToken(request.clientId ?? this.platformUtilsService.identityClientId)),
|
||||
credentials: this.getCredentials(),
|
||||
|
Loading…
Reference in New Issue
Block a user