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