Skip to content

Commit

Permalink
fix: make lifespan parameter optional
Browse files Browse the repository at this point in the history
  • Loading branch information
otabek-magic committed Aug 1, 2024
1 parent 43edeac commit 5aa6eb6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@magic-ext/oauth/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class OAuthExtension extends Extension.Internal<'oauth'> {
});
}

public getRedirectResult(lifespan: number) {
public getRedirectResult(lifespan?: number) {
const queryString = window.location.search;

// Remove the query from the redirect callback as a precaution to prevent
Expand Down Expand Up @@ -87,7 +87,7 @@ async function createURI(this: OAuthExtension, configuration: OAuthRedirectConfi
};
}

function getResult(this: OAuthExtension, queryString: string, lifespan: number) {
function getResult(this: OAuthExtension, queryString: string, lifespan?: number) {
return this.utils.createPromiEvent<OAuthRedirectResult>(async (resolve, reject) => {
const json: string = (await this.utils.storage.getItem(OAUTH_REDIRECT_METADATA_KEY)) as string;

Expand Down

0 comments on commit 5aa6eb6

Please sign in to comment.