I have login system setup using PlayerAccounts that works just fine on mobile devices or in unity editor, but when I try it logging in on WebGL build I get this error when I click on Login button
web build test db.framework.js:3 MethodAccessException: Attempt to access method ‘Unity.Services.Authentication.PlayerAccounts.IBrowserUtils.Bind’ on type ‘’ failed.
Any possible solutions please?
Check for package updates to any of the service packages. If there are any, install them and try again. It did fix a very similar PlayerAccount issue for someone recently.
I am using 3.2.0 version for authentication package. It doesn’t show any update possibility in the package manager.
I’m on the same boat.. on the highest version of authentication packages, and it’s dependencies… Did you figure this out?
Hi there!
The Unity Player Accounts flow doesn’t work from a WebGL context. Due to the way the it is currently implemented it requires permission to bind to a TCP port during sign in flow and this is not possible from a browser.
This may be something we refactor in future, for example to use sockets for eventing to signal to the game the user has signed in, instead of listening for a callback event on a TCP port.
For a WebGL game, as you also can’t use native platform SDKs. The easiest way to implement some form of non-anonymous sign in is to use Username and Password for authentication.
It’s technically possible to integrate with just about any OAuth Provider but that would be something you would need to do outside Unity using a website leveraging JavaScript to interact with your game from a webpage to pass tokens for sign in to your game, after a user has signed in to your website.
Best regards,
Iain Collins
Hi,
Is it possible to use Magic Link (Magic | Signup) for webgl authorization using the identity provider, Custom ID?
Thanks!
danosono
It would be really desireable to have Unity Player Accounts also work with WebGL builds as its promise to “offer robust cross-platform account and authentication solutions that support cross-play and progression across all major devices and platforms.” and the potential use of Unity Gaming Services depend on that.
Are there any plans of when this will be implemented?