Unity Integration

Hi,

I'm getting stuck with integrating Web3Auth with Unity (stand alone application).

I did the following:

  1. Created a Phantom wallet
  2. Added the Phantom extension to Chrome
  3. Created a Web3Auth account
  4. Created a Web3Auth project
  5. Added my whitelisted URLs (xxxapp://com.XXX.Web3AuthUnity)
  6. Created a Unity project
  7. Imported the Web3Auth project
  8. Generated a Deep Link (xxxapp://com.XXX.Web3AuthUnity)
  9. Opened the sample scene
  10. Modified the Web3AuthSample.cs with my clientId and the redirectUrl (xxxapp://com.XXX.Web3AuthUnity/auth)
  11. Built the exe

When I run and select Google & Login:

  1. A browser opens and shows me my Google account.
  2. I log into my Google account
  3. I redirect to "https://sdk.openlogin.com/redirect"
  4. I'm asked by the browser dialog if I want to open my Web3AuthUnity.exe
  5. I press "Open Web3AuthUnity.exe"

Nothing happens. My exe is still sitting on the login screen.

If I browse to "xxxapp://com.XXX.Web3AuthUnity/auth" manually, my app does open to the login screen. So, I know the deep link is there.

In the exe, I never seem to get a return request from the Web3Auth login based on debug lines I log. Maybe my Phantom Wallet isn't tied to my Google account? I'm not getting any kind of error message.

Any help would be super appreciated.



Originally posted by: Tryz

Check the discussion at: https://github.com/orgs/Web3Auth/discussions/376

I dont think Phantom Wallet works with native Web3Auth, only our social logins. @hugtor can you help here



Originally posted by: YZhenY

@Tryz How did you solved this ?

I have troubles with unity build for Android.
Social media / gmail Authentication works perfectly on iOS, but on Android, the "redirect to app" button doesnt send the confirmation and doesnt take me back to the app.
When I go back to the app manually, nothing happens ....
Like if the app is not getting a response from web3auth.
The "onLogin" method does not seem to be running
PLEASE HELP 🙏🏼
(working well on iOS)



Originally posted by: Oberhaim