Universal SDK
English
English
  • README
  • Unity SDK
    • Get Started
      • Android Setup(deprecated)
      • Android Setup
        • Jitpack to Migration
      • iOS Setup
    • Integrations
    • Trouble Shooting
      • Google Login issue
      • UniversalSDK.framework Load failure when running app
      • Android Proguard ClassNotFoundException
  • console guide
    • Google Login
      • Android
      • iOS
    • Apple Login
      • iOS
      • Android
        • Redirect Server
    • Facebook Login
  • Server Side
    • Verify Google ID token
    • Verify Apple identity token
    • Verify Facebook access token
Powered by GitBook
On this page
  1. Server Side

Verify Apple identity token

PreviousVerify Google ID tokenNextVerify Facebook access token

Last updated 1 year ago

To , your app server must

  • Verify the JWS E256 signature using the server’s public key

  • Verify the nonce for the authentication

  • Verify that the iss field contains https://appleid.apple.com

  • Verify that the aud field is the developer’s client_id

  • Verify that the time is earlier than the exp value of the token

Go :

import(
    "github.com/coolishbee/go-verify-apple-id-token"
)

func main() {
	client := New()

	jwtClaims, err := client.VerifyIdToken("com.clientId.here", "idToken")
	if err != nil {
		t.Errorf("%s", err)
	} else {
		fmt.Println(jwtClaims.Email)
	}
}
verify the identity token