Apple Auth for Android App
val appleAuth = Retrofit.Builder()
.baseUrl("https://appleid.apple.com/")
.build()
.create<AppleAuth>()
launch {
val appleAuthToken = appleAuth.getAuthToken(AuthPayload(
clientId = clientId,
clientSecret = clientSecret,
grantType = "authorization_code",
code = code,
redirectUri = redirectUri,
))
}
curl -v POST "https://appleid.apple.com/auth/token" \
-H 'content-type: application/x-www-form-urlencoded' \
-d 'client_id=CLIENT_ID' \
-d 'client_secret=CLIENT_SECRET' \
-d 'code=CODE' \
-d 'grant_type=authorization_code' \
-d 'redirect_uri=REDIRECT_URI'