Skip to content
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

How to use with external browser authentication #226

Open
ryunik opened this issue Jun 14, 2022 · 1 comment
Open

How to use with external browser authentication #226

ryunik opened this issue Jun 14, 2022 · 1 comment

Comments

@ryunik
Copy link

ryunik commented Jun 14, 2022

Trying to integrate into an electron application where the user selects their authentication option in the electron app, but when they select a social login (eg. Google), they are taken to the default browser on their computer, rather than redirecting in the same electron window or a electron hosted popup window.

I'm able to intercept the requests using the uxMode popup or redirect, and open the same link in the user's default browser, but upon opening, it's just a blank screen, with the following error message in console:
image

This happens when trying to open either of the links in an external browser:

Looking through the code a bit, seems the popup option probably will not work, since it relies on window.postMessage to communicate with the original window. Whereas the redirect option seems to go off the hash params passed to the redirect link? If I could get the initial auth to complete successfully and set a custom redirect link, it should be relatively easy to send the hash params back to the electron app, but not sure if there is a method to init manually with this value, or if it's only ever extracted from the window href?

Any help would be greatly appreciated! 😁

Cross post of Web3Auth/Auth#141. Not sure in which repo this belongs

@AndonMitev
Copy link

Hey bro, how do you manage to open user browser, when i click on social login nothing happens? :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants