jsoprano/php-apple-signin-php56

A simple library to decode and parse Apple Sign In client tokens.

Maintainers

Package info

github.com/jsoprano/php-apple-signin-php56

pkg:composer/jsoprano/php-apple-signin-php56

Statistics

Installs: 28 544

Dependents: 0

Suggesters: 0

Stars: 0

1.1.1 2020-08-25 16:36 UTC

This package is not auto-updated.

Last update: 2026-03-05 20:14:05 UTC


README

PHP library to manage Sign In with Apple identifier tokens, and validate them server side passed through by the iOS client.

FORK to make it compatible with PHP 5.6

Installation

Use composer to manage your dependencies and download php-apple-signin:

composer require jsoprano/php-apple-signin-php56

Example

<?php
use AppleSignIn\ASDecoder;

$clientUser = "example_client_user";
$identityToken = "example_encoded_jwt";

$appleSignInPayload = ASDecoder::getAppleSignInPayload($identityToken);

/**
 * Obtain the Sign In with Apple email and user creds.
 */
$email = $appleSignInPayload->getEmail();
$user = $appleSignInPayload->getUser();

/**
 * Determine whether the client-provided user is valid.
 */
$isValid = $appleSignInPayload->verifyUser($clientUser);

?>