Supabase is an open source Firebase alternative. It provides all the backend services you need to build a product. Supabase uses Postgres database with real-time capabilities. Basically, supabase provides an interface to manage postgres database that you can use to create table and insert, edit...
In this example, we will take a look at how we can implement authentication using Apple sign-in to secure our application using the Supabase SDK for B4X.
SignIn with Apple is currently only available for B4I
It will only work with iOS 13. Most iOS devices run iOS 13+.
Configure the mobileprovision file on the Apple developer console
1. Enable 'Sign In With Apple' in the app identifier page in Apple developer console. The app id must be a non-wildcard id.
2. Download an updated provision profile and set it with:
#AdditionalLib: AuthenticationServices.framework #MinVersion: 13 #Entitlement: <key>com.apple.developer.applesignin</key><array><string>Default</string></array>
We don't need a Client Id
Wait For (xSupabase.Auth.SignInWithOAuth("","apple","")) Complete (User As SupabaseUser)'wen dont need a client id If User.Error.Success Then Log("successfully logged in with " & User.Email) Else Log("Error: " & User.Error.ErrorMessage) End If
Open the Supabase Dashboard and got to: authentication -> Providers -> Apple
to set up Apple auth. Toggle the Enable Sign in with Apple switch first. Then add the package name of your app:
Now your users can easily log in to your app with apple.