Supabase with Unity
ChangeNode ChangeNode
9.82K subscribers
3,734 views
67

 Published On Apr 28, 2023

Demonstration showing how to use Unity with Supabase. If you just want to use email/password or if you would also like to support the native Sign in with Apple functionality on iOS, this video will help you get started.

https://supabase.com/ - Postgres database, Auth, Storage, Edge functions, and more. Free & inexpensive hosting options as well as options that scale up for enterprise, including self-hosting and local dev tools.

https://github.com/supabase-community... - C# library to make it easy to use Supabase. Install this via the NuGetForUnity package below.

https://supabase.com/docs/guides/auth... - Instructions on getting started with Sign in with Apple using Supabase. If you have any familiarity with JavaScript or TypeScript I would suggest verifying that you can use Sign in with Apple functionality via a quick & dirty JS project - this will be easiest for Supabase support if you run into problems.

https://github.com/Cysharp/UniTask - Add proper support for C# async/await to Unity, which is used heavily by the supabase-csharp project. Be sure to install via the Unity Package manager via the Git URL method, not via NuGet.

https://github.com/GlitchEnzo/NuGetFo... - Use this to install supabase-csharp, along with needed dependencies.

https://developer.apple.com/ - Go here to sign up for an Apple Developer account.

https://developer.apple.com/documenta... - Technical information from Apple on Sign in with Apple. You'll use the on-device native dialog to Sign in with Apple on iOS, and Supabase uses the REST APIs on your behalf to handle the rest of the flow.

https://gist.github.com/wiverson/a202... - Gist of the SupabaseStuff.cs class from the demo video. If you just want to support email/password you can remove the Sign in with Apple stuff and presumably use the rest of Supabase everywhere - e.g. Windows, Linux, etc. My guess is that WebGL builds won't work, but that's just a guess.

https://gist.github.com/wiverson/8c7e... - Gist of the AppleSignIn.cs class from the demo video. This shows how to use the supabase-csharp classes to generate a nonce and a nonce hash, as well as how to invoke the native Sign in with Apple dialog.

Many thanks to https://github.com/acupofjose for adding the functionality to the https://github.com/supabase-community... library to complete the flow for the Sign in with Apple flow!

If you have any questions or wish to reach out, feel free to ping me at https://www.changenode.com/

show more

Share/Embed