Skip to content

Commit

Permalink
revert change
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethella committed Dec 12, 2024
1 parent 5661ad9 commit a1c014a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/@magic-ext/oauth2/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class OAuthExtension extends Extension.Internal<'oauth2'> {
new URL(successResult.oauthAuthoriationURI, this.sdk.endpoint).href
: successResult.oauthAuthoriationURI;

if (configuration?.shouldReturnURI) {
if (successResult?.shouldReturnURI) {
resolve(redirectURI);
} else {
window.location.href = redirectURI;
Expand Down Expand Up @@ -120,8 +120,8 @@ export class OAuthExtension extends Extension.Internal<'oauth2'> {
console.log('Error while verifying telegram data', verificationError);
}
}
} catch (seamlessLoginError) {
console.log('Error while loading telegram-web-app script', seamlessLoginError);
} catch (seamlessLoginError) {
console.log('Error while loading telegram-web-app script', seamlessLoginError);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/@magic-ext/oauth2/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export type OpenIDConnectUserInfo = OpenIDConnectProfile &
export interface OAuthRedirectStartResult {
oauthAuthoriationURI?: string;
useMagicServerCallback?: boolean;
shouldReturnURI?: boolean;
}

export interface OAuthRedirectResult {
Expand Down Expand Up @@ -101,7 +102,6 @@ export interface OAuthRedirectConfiguration {
scope?: string[];
customData?: string;
loginHint?: string;
shouldReturnURI?: boolean;
}

export interface OAuthPopupConfiguration {
Expand Down

0 comments on commit a1c014a

Please sign in to comment.