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

Web3auth seperate window for webgl #904

Closed
wants to merge 8 commits into from

Conversation

sneakzttv
Copy link
Contributor

@sneakzttv sneakzttv commented Mar 13, 2024

Web3auth now opens in a seperate window for webgl so that it doesn't close the game.

Closes #894

To test:
Login in with web3auth in webgl.

Expected behavior:
A new window will open to let you connect.

@sneakzttv sneakzttv linked an issue Mar 13, 2024 that may be closed by this pull request
3 tasks
@sneakzttv sneakzttv added the ready-to-merge Ready to Merge PR - this'll trigger required checks label Mar 13, 2024
@sneakzttv sneakzttv added ready-to-merge Ready to Merge PR - this'll trigger required checks and removed ready-to-merge Ready to Merge PR - this'll trigger required checks labels Mar 13, 2024
@sneakzttv sneakzttv removed the ready-to-merge Ready to Merge PR - this'll trigger required checks label Mar 13, 2024
@sneakzttv sneakzttv added the ready-to-merge Ready to Merge PR - this'll trigger required checks label Mar 13, 2024
Copy link
Contributor

@juans-chainsafe juans-chainsafe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a build error on this PR:

Library/PackageCache/com.tools.webglthreadingpatcher@c2f3628a02/ThreadingPatcher/Editor/WebGLThreadingPatcher.cs(21,38): error CS1061: 'BuildReport' does not contain a definition for 'GetFiles' and no accessible extension method 'GetFiles' accepting a first argument of type 'BuildReport' could be found (are you missing a using directive or an assembly reference?)

Unloading broken assembly Library/ScriptAssemblies/Unity.Rider.Editor.dll, this assembly can cause crashes in the runtime

@juans-chainsafe
Copy link
Contributor

There is a build error on this PR:

Library/PackageCache/com.tools.webglthreadingpatcher@c2f3628a02/ThreadingPatcher/Editor/WebGLThreadingPatcher.cs(21,38): error CS1061: 'BuildReport' does not contain a definition for 'GetFiles' and no accessible extension method 'GetFiles' accepting a first argument of type 'BuildReport' could be found (are you missing a using directive or an assembly reference?)

Unloading broken assembly Library/ScriptAssemblies/Unity.Rider.Editor.dll, this assembly can cause crashes in the runtime

Sorry, my bad, it was on my editor, solved uninstalling WebGLThreadingPatcher package and install it again

Copy link
Contributor

@juans-chainsafe juans-chainsafe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sneakzttv @kantagara Is working, so is opened in a new tab but after the user login in this new tab, the first tab remains there with the web3auth login scene, and the user is logged in the second tab, is the expected behaviour? Basically, which one should happen?:

  • User is logged in the second tab (and the first tab remains there with the login scene)
  • Second tab is closed after the user login and first tab redirects to the SampleMain
  • User is logged in the second tab and the first tab is closed automatically to not cause confusion to the user

@kantagara
Copy link
Contributor

Second tab is closed after the user login and first tab redirects to the SampleMain

This should be the expected behaviour.

Copy link
Contributor

@juans-chainsafe juans-chainsafe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is partially working, the web3auth opens in a new tab but remains in that tab.

Actual result:

  • User is logged in the second tab (and the first tab remains there with the login scene)

Expected result:

  • Second tab is closed after the user login and first tab redirects to the SampleMain

Evidence
https://github.com/ChainSafe/web3.unity/assets/104365141/8760f2bd-587e-4a9e-9b8e-47eed864b4a0

@sneakzttv
Copy link
Contributor Author

sneakzttv commented Mar 13, 2024

I don't think we have access to the auth page, i think the redirect back to the url is happening there, we're not doing that unity side. It's also changing from localhost to localhost + session id.

It might be better as it currently is then? A reload is better than 2 game instances i guess.

Initial
image

After w3a
image

@sneakzttv sneakzttv added ready-to-merge Ready to Merge PR - this'll trigger required checks and removed ready-to-merge Ready to Merge PR - this'll trigger required checks labels Mar 13, 2024
@sneakzttv sneakzttv removed the ready-to-merge Ready to Merge PR - this'll trigger required checks label Mar 13, 2024
@sneakzttv sneakzttv closed this Mar 20, 2024
@sneakzttv sneakzttv deleted the Sneakz/web3auth-seperate-window-webgl branch March 20, 2024 12:36
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

Successfully merging this pull request may close these issues.

Web3Auth -> Ensure it's opening in the new tab in webgl.
3 participants