File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
packages/auth/src/api/authentication Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 17
17
18
18
/* eslint-disable camelcase */
19
19
20
- import { querystring } from '@firebase/util' ;
20
+ import { isCloudWorkstation , querystring } from '@firebase/util' ;
21
21
22
22
import {
23
23
_getFinalTarget ,
@@ -84,11 +84,18 @@ export async function requestStsToken(
84
84
const headers = await ( auth as AuthInternal ) . _getAdditionalHeaders ( ) ;
85
85
headers [ HttpHeader . CONTENT_TYPE ] = 'application/x-www-form-urlencoded' ;
86
86
87
- return FetchProvider . fetch ( ) ( url , {
87
+ const options : RequestInit = {
88
88
method : HttpMethod . POST ,
89
89
headers,
90
90
body
91
- } ) ;
91
+ } ;
92
+ if (
93
+ auth . emulatorConfig &&
94
+ isCloudWorkstation ( auth . emulatorConfig . host )
95
+ ) {
96
+ options . credentials = 'include' ;
97
+ }
98
+ return FetchProvider . fetch ( ) ( url , options ) ;
92
99
}
93
100
) ;
94
101
You can’t perform that action at this time.
0 commit comments