Skip to content

Commit

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

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 All @@ -66,7 +66,7 @@ export class OAuthExtension extends Extension.Internal<'oauth2'> {
}
}

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 parseRedirectResult = this.utils.createJsonRpcRequestPayload(OAuthPayloadMethods.Verify, [
{
Expand Down

0 comments on commit 49eb7fc

Please sign in to comment.