Skip to content

Commit

Permalink
fix: info function disableSetCookie
Browse files Browse the repository at this point in the history
  • Loading branch information
CaduGomes committed Sep 9, 2024
1 parent 71dde04 commit 849c964
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
}
}
4 changes: 2 additions & 2 deletions src/sdk/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ export class KonectyClient {
}
}

async info(token?: string): Promise<KonectyUserInfo> {
async info(token?: string, disableSetCookie?: boolean): Promise<KonectyUserInfo> {
try {
const userToken = this.#getToken(token);

Expand All @@ -504,7 +504,7 @@ export class KonectyClient {
if (body.logged) {
this.#options.accessKey = userToken;

if (isBrowser) {
if (isBrowser && disableSetCookie !== true) {
Cookies.set('_authTokenId', userToken);
}
}
Expand Down

0 comments on commit 849c964

Please sign in to comment.