Skip to content

Commit

Permalink
feat: ignore subsequent requests to authorize if user already authorized
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsl4 committed Nov 14, 2023
1 parent 9165e3a commit c153ab4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/WazeSpaceClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export class WazeSpaceClient {
}

async authenticate() {
if (this.accessToken) return;

const initData = await this._sendAuthInitRequest();
const valueToSend = `\x02${initData.sessionKey}\x04`;
const { id: commentId } = await sendUpdateRequestComment(initData.target.id, valueToSend);
Expand Down

0 comments on commit c153ab4

Please sign in to comment.