Class AppleSignInResult
java.lang.Object
com.codename1.social.AppleSignInResult
public final class AppleSignInResult
extends java.lang.Object
Successful outcome of an AppleSignIn.signIn(String, AppleSignInCallback)
call.
Apple only returns the user's name and email on the first authorization
for a given app. On subsequent sign-ins those fields are absent in the
native callback; AppleSignIn backfills them from Preferences
when present, so the application sees a consistent result.
- Since:
- 7.0.245
-
Method Summary
Modifier and TypeMethodDescriptionAuthorization code suitable for the server-sideclient_secrettoken exchange (Apple does not expose refresh tokens to public clients, so this is the only way to obtain one).getEmail()Email the user shared with the app.Full display name (given + family) on the first authorization; previously-stored value otherwise;nullif the user declined to share it.JWT identity token signed by Apple.Stable opaque identifier ("user identifier" in Apple's docs).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
getIdentityToken
JWT identity token signed by Apple. Send to your backend, where you must validate the signature against Apple's JWKS and check theaud/iss/expclaims before trusting it. -
getAuthorizationCode
Authorization code suitable for the server-sideclient_secrettoken exchange (Apple does not expose refresh tokens to public clients, so this is the only way to obtain one). -
getUserId
Stable opaque identifier ("user identifier" in Apple's docs). Treat this as the user's primary key for your app. -
getEmail
Email the user shared with the app. May be the real address, may be a relay address (@privaterelay.appleid.com), or may benullif the user has previously signed in and the email was already stored. -
getFullName
Full display name (given + family) on the first authorization; previously-stored value otherwise;nullif the user declined to share it.
-