Skip to content

Commit

Permalink
fix cookie logic
Browse files Browse the repository at this point in the history
  • Loading branch information
H34D committed Nov 9, 2022
1 parent cd91490 commit 398ddb9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/utils/clients/middleware.ts
Expand Up @@ -105,10 +105,9 @@ export class MasaClient {
});

if (getChallengeResponse) {
const cookies = getChallengeResponse.headers["set-cookie"];
const cookie = getChallengeResponse.headers["set-cookie"];

let cookie;
if (cookies) cookie = cookies[0];
if (!cookie) console.warn("No cookie in response!");

const { data: challengeData } = getChallengeResponse;

Expand Down

0 comments on commit 398ddb9

Please sign in to comment.