Skip to content

Commit

Permalink
Make code verifier optional in StateStore.set method
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiodxa committed Jan 4, 2025
1 parent 8d2adef commit 566bb58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ export class StateStore {
/**
* Append a new state and code verifier to the store
*/
set(state: string, verifier: string) {
set(state: string, verifier?: string) {
this.state = state;
this.codeVerifier = verifier;

this.states.add(state);
this.codeVerifiers.set(state, verifier);
if (verifier) this.codeVerifiers.set(state, verifier);
}

/**
Expand Down

0 comments on commit 566bb58

Please sign in to comment.