mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
credentials: 'include'
This commit is contained in:
@@ -76,7 +76,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
async postIdentityToken(request: TokenRequest): Promise<IdentityTokenResponse | IdentityTwoFactorResponse> {
|
||||
const response = await fetch(new Request(this.identityBaseUrl + '/connect/token', {
|
||||
body: this.qsStringify(request.toIdentityToken(this.platformUtilsService.identityClientId)),
|
||||
credentials: 'include',
|
||||
credentials: 'include',
|
||||
cache: 'no-cache',
|
||||
headers: new Headers({
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8',
|
||||
@@ -119,7 +119,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
const response = await fetch(new Request(this.baseUrl + '/two-factor/send-email-login', {
|
||||
body: JSON.stringify(request),
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Content-Type': 'application/json; charset=utf-8',
|
||||
'Device-Type': this.deviceType,
|
||||
@@ -139,6 +139,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
const authHeader = await this.handleTokenState();
|
||||
const response = await fetch(new Request(this.baseUrl + '/accounts/profile', {
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Accept': 'application/json',
|
||||
'Authorization': authHeader,
|
||||
@@ -159,7 +160,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
const authHeader = await this.handleTokenState();
|
||||
const response = await fetch(new Request(this.baseUrl + '/accounts/revision-date', {
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Accept': 'application/json',
|
||||
'Authorization': authHeader,
|
||||
@@ -179,7 +180,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
const response = await fetch(new Request(this.baseUrl + '/accounts/password-hint', {
|
||||
body: JSON.stringify(request),
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Content-Type': 'application/json; charset=utf-8',
|
||||
'Device-Type': this.deviceType,
|
||||
@@ -197,7 +198,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
const response = await fetch(new Request(this.baseUrl + '/accounts/register', {
|
||||
body: JSON.stringify(request),
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Content-Type': 'application/json; charset=utf-8',
|
||||
'Device-Type': this.deviceType,
|
||||
@@ -218,7 +219,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
const response = await fetch(new Request(this.baseUrl + '/folders', {
|
||||
body: JSON.stringify(request),
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Accept': 'application/json',
|
||||
'Authorization': authHeader,
|
||||
@@ -242,7 +243,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
const response = await fetch(new Request(this.baseUrl + '/folders/' + id, {
|
||||
body: JSON.stringify(request),
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Accept': 'application/json',
|
||||
'Authorization': authHeader,
|
||||
@@ -265,7 +266,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
const authHeader = await this.handleTokenState();
|
||||
const response = await fetch(new Request(this.baseUrl + '/folders/' + id, {
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Authorization': authHeader,
|
||||
'Device-Type': this.deviceType,
|
||||
@@ -286,7 +287,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
const response = await fetch(new Request(this.baseUrl + '/ciphers', {
|
||||
body: JSON.stringify(request),
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Accept': 'application/json',
|
||||
'Authorization': authHeader,
|
||||
@@ -310,7 +311,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
const response = await fetch(new Request(this.baseUrl + '/ciphers/' + id, {
|
||||
body: JSON.stringify(request),
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Accept': 'application/json',
|
||||
'Authorization': authHeader,
|
||||
@@ -333,7 +334,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
const authHeader = await this.handleTokenState();
|
||||
const response = await fetch(new Request(this.baseUrl + '/ciphers/' + id, {
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Authorization': authHeader,
|
||||
'Device-Type': this.deviceType,
|
||||
@@ -354,7 +355,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
const response = await fetch(new Request(this.baseUrl + '/ciphers/' + id + '/attachment', {
|
||||
body: data,
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Accept': 'application/json',
|
||||
'Authorization': authHeader,
|
||||
@@ -376,7 +377,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
const authHeader = await this.handleTokenState();
|
||||
const response = await fetch(new Request(this.baseUrl + '/ciphers/' + id + '/attachment/' + attachmentId, {
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Authorization': authHeader,
|
||||
'Device-Type': this.deviceType,
|
||||
@@ -396,7 +397,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
const authHeader = await this.handleTokenState();
|
||||
const response = await fetch(new Request(this.baseUrl + '/sync', {
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Accept': 'application/json',
|
||||
'Authorization': authHeader,
|
||||
@@ -418,6 +419,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
const response = await fetch(new Request(this.baseUrl + '/organizations/' + organizationId + '/import', {
|
||||
body: JSON.stringify(request),
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Accept': 'application/json',
|
||||
'Authorization': authHeader,
|
||||
@@ -474,7 +476,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
refresh_token: refreshToken,
|
||||
}),
|
||||
cache: 'no-cache',
|
||||
credentials: 'include',
|
||||
credentials: 'include',
|
||||
headers: new Headers({
|
||||
'Content-Type': 'application/x-www-form-urlencoded; charset=utf-8',
|
||||
'Accept': 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user