Android Example [B4X] Supabase - Authentification SignIn with Apple

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:
#ProvisionFile: xxx.mobileprovision
3. Add to main module:
#AdditionalLib: AuthenticationServices.framework
#MinVersion: 13
#Entitlement: <key></key><array><string>Default</string></array>
4. Add this code:
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)
        Log("Error: " & User.Error.ErrorMessage)
    End If
Configure Apple sign-in on Supabase Auth
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:

That's it!
Now your users can easily log in to your app with apple.


  • Supabase Apple Auth
    4 KB · Views: 79