mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
add auth-email header (#394)
This commit is contained in:
@@ -73,4 +73,10 @@ export class TokenRequest {
|
|||||||
|
|
||||||
return obj;
|
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) {
|
if (this.customUserAgent != null) {
|
||||||
headers.set('User-Agent', this.customUserAgent);
|
headers.set('User-Agent', this.customUserAgent);
|
||||||
}
|
}
|
||||||
|
request.alterIdentityTokenHeaders(headers);
|
||||||
const response = await this.fetch(new Request(this.identityBaseUrl + '/connect/token', {
|
const response = await this.fetch(new Request(this.identityBaseUrl + '/connect/token', {
|
||||||
body: this.qsStringify(request.toIdentityToken(request.clientId ?? this.platformUtilsService.identityClientId)),
|
body: this.qsStringify(request.toIdentityToken(request.clientId ?? this.platformUtilsService.identityClientId)),
|
||||||
credentials: this.getCredentials(),
|
credentials: this.getCredentials(),
|
||||||
|
|||||||
Reference in New Issue
Block a user