Auth0 Home Blog Docs

Using Auth0 authentication with Unity



Anyone have experience using Unity + Auth0?

We have been using Auth0 for a while with native iOS but recently switched to Unity. Did not want to change our Authentication provider, though it appears it may be necessary.

Our research has not turned up much information on this topic but it did point to using a WebView and Single Page Application. Managed to get a player authenticated [verified via Auth0 Logs], but the Unity client never actually receives the msg because it is failing on the callback[http://localhost:3000].

So if you have experience in this dept, I invite you to help us and more details can be provided!


There is indeed no SDK specific to Unity and I also could not found any sample code. Depending on the type of authentication supported in your application you could require different approaches. For example, if the application only used a database connections (username/password credentials specific to the game) then it could consider authentication using the resource owner password credentials grant which is somewhat linear given it translates to a single HTTPS call plus a custom UI to collect the credentials.

If on the other hand you made use of social authentication then the game (native application) should be doing a PKCE flow with a redirect URL using a custom scheme (instead of localhost) associated with the native application. However, that is significantly more complex and where the lack of sample code could be an issue.


@zecmo I am willing to do exactly the same as you, ideally with social login as well. Did you get any further since you posted your question ?,I am wishing to do exactly the same, probably with social login as well. Did you guys or anyone else get more information about this since your last comments ?