mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
dont use credentials for safari
This commit is contained in:
@@ -113,6 +113,7 @@ export class ApiService implements ApiServiceAbstraction {
|
|||||||
private isWebClient = false;
|
private isWebClient = false;
|
||||||
private isDesktopClient = false;
|
private isDesktopClient = false;
|
||||||
private usingBaseUrl = false;
|
private usingBaseUrl = false;
|
||||||
|
private useCredentials = true;
|
||||||
|
|
||||||
constructor(private tokenService: TokenService, private platformUtilsService: PlatformUtilsService,
|
constructor(private tokenService: TokenService, private platformUtilsService: PlatformUtilsService,
|
||||||
private logoutCallback: (expired: boolean) => Promise<void>) {
|
private logoutCallback: (expired: boolean) => Promise<void>) {
|
||||||
@@ -124,6 +125,7 @@ export class ApiService implements ApiServiceAbstraction {
|
|||||||
device === DeviceType.UnknownBrowser || device === DeviceType.VivaldiBrowser;
|
device === DeviceType.UnknownBrowser || device === DeviceType.VivaldiBrowser;
|
||||||
this.isDesktopClient = device === DeviceType.WindowsDesktop || device === DeviceType.MacOsDesktop ||
|
this.isDesktopClient = device === DeviceType.WindowsDesktop || device === DeviceType.MacOsDesktop ||
|
||||||
device === DeviceType.LinuxDesktop;
|
device === DeviceType.LinuxDesktop;
|
||||||
|
this.useCredentials = device !== DeviceType.SafariBrowser;
|
||||||
}
|
}
|
||||||
|
|
||||||
setUrls(urls: EnvironmentUrls): void {
|
setUrls(urls: EnvironmentUrls): void {
|
||||||
@@ -1015,7 +1017,7 @@ export class ApiService implements ApiServiceAbstraction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private getCredentials(): RequestCredentials {
|
private getCredentials(): RequestCredentials {
|
||||||
if (!this.isWebClient || this.usingBaseUrl) {
|
if (this.useCredentials && (!this.isWebClient || this.usingBaseUrl)) {
|
||||||
return 'include';
|
return 'include';
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user