File tree Expand file tree Collapse file tree 4 files changed +22
-6
lines changed
Expand file tree Collapse file tree 4 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 2020 let res = await fetch (' /auth/v1/providers/callback' , {
2121 method: ' post' ,
2222 body: JSON .stringify (data ),
23- headers: [[' csrf-token' , localStorage .getItem (' csrfToken' )! ]]
23+ headers: [
24+ [' csrf-token' , localStorage .getItem (' csrfToken' )! ],
25+ [' content-type' , ' application/json' ]
26+ ]
2427 });
2528
2629 if (res .status === 202 ) {
Original file line number Diff line number Diff line change 4141 given_name: ' Weird' ,
4242 family_name: ' User' ,
4343 pow: powResult
44- })
44+ }),
45+ headers: [[' content-type' , ' application/json' ]]
4546 });
4647 await checkResponse (registerResp );
4748
Original file line number Diff line number Diff line change 7575 let res = await fetch (' /auth/v1/providers/login' , {
7676 method: ' post' ,
7777 body: JSON .stringify (data ),
78- headers: [[' csrf-token' , localStorage .getItem (' csrfToken' )! ]]
78+ headers: [
79+ [' csrf-token' , localStorage .getItem (' csrfToken' )! ],
80+ [' content-type' , ' application/json' ]
81+ ]
7982 });
8083 await checkResponse (res );
8184 const xsrfToken = await res .text ();
135138 nonce: nonce ,
136139 scopes
137140 }),
138- headers: [[' csrf-token' , localStorage .getItem (' csrfToken' )! ]]
141+ headers: [
142+ [' csrf-token' , localStorage .getItem (' csrfToken' )! ],
143+ [' content-type' , ' application/json' ]
144+ ]
139145 });
140146 await handleAuthResp (authResp , true );
141147 return ;
176182 const authResp = await fetch (' /auth/v1/oidc/authorize' , {
177183 method: ' post' ,
178184 body: JSON .stringify (req ),
179- headers: [[' csrf-token' , localStorage .getItem (' csrfToken' )! ]]
185+ headers: [
186+ [' csrf-token' , localStorage .getItem (' csrfToken' )! ],
187+ [' content-type' , ' application/json' ]
188+ ]
180189 });
181190 await handleAuthResp (authResp );
182191 }
Original file line number Diff line number Diff line change 2121 try {
2222 const resp = await fetch (' /auth/v1/oidc/logout' , {
2323 method: ' post' ,
24- headers: [[' csrf-token' , csrf ! ]],
24+ headers: [
25+ [' csrf-token' , csrf ! ],
26+ [' content-type' , ' application/json' ]
27+ ],
2528 body: JSON .stringify (req )
2629 });
2730 await checkResponse (resp );
You can’t perform that action at this time.
0 commit comments