Skip to main content
Version: 5.7.0

SmartSwitchAuthenticateApple

Smart Switch Authenticate will logout of the current profile, and switch to the new authentication type.

In event the current session was previously a completely anonymous account, the smart switch will delete that profile (since completely anonymous accounts are irretrievable once you switch away from them).

Use this function to keep a clean designflow from anonymous to signed profiles.

Authenticate the user with Sign in with Apple.

Method Parameters

ParameterDescription
appleUserIdThe user id of the authenticated user. It should match the sub field of the identity token. This is the identifier that will be attached to the user's profile.
identityTokenThe JSON Web Token that represents the user's identity
forceCreateShould a new profile be created for this user if the account does not exist?

Usage

http://localhost:3000
string appleUserId = "123456789";
string identityToken = "identityTokenFromApple";
bool forceCreate = true;

_bc.SmartSwitchAuthenticateAple(
appleUserId, identityToken, forceCreate, SuccessCallback, FailureCallback);
JSON Response
var appleUserId = "123456789";
var identityToken = "identityTokenFromApple";
var forceCreate = true;

_bc.smartSwitchAuthenticateApple(appleUserId, identityToken, forceCreate, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});