-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: social login popup blocked by safari #3878
Conversation
🦋 Changeset detectedLatest commit: 79596e8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 19 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
9 Skipped Deployments
|
Coverage Report
File Coverage
|
vi.spyOn(AccountController, 'setSocialProvider') | ||
vi.spyOn(EventsController, 'sendEvent') | ||
vi.spyOn(RouterController, 'push') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to spyOn these if we don't check them if they are called or not?
this.popupWindow = CoreHelperUtil.returnOpenHref( | ||
'', | ||
'popupWindow', | ||
'width=600,height=800,scrollbars=yes' | ||
) | ||
|
||
if (this.popupWindow) { | ||
AccountController.setSocialWindow(this.popupWindow, ChainController.state.activeChain) | ||
} else { | ||
throw new Error('Something went wrong') | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this impact TG integration @ganchoradkov ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
most likely yes, this.popupWindow
is undefined in telegram context so the logic will not continue with this throw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a change
@@ -237,34 +237,38 @@ export class W3mSocialLoginWidget extends LitElement { | |||
|
|||
try { | |||
if (authConnector && socialProvider) { | |||
this.popupWindow = CoreHelperUtil.returnOpenHref( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We open new window here and also opening new window in (CoreHelperUtil.isTelegram()) {...}
. Not sure if this breaks stuff in telegram
Description
We have an asynchronous function which takes time to load up the popup window which then causes browsers like safari to block our popup window.
Type of change
Associated Issues
For Linear issues: Closes APKT-2306
Checklist