monogatari/php-apple-signin

php apple sign in,match php 5.6

Installs: 603

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 1

Type:project

pkg:composer/monogatari/php-apple-signin

v0.1 2020-06-09 06:23 UTC

This package is auto-updated.

Last update: 2026-01-17 22:22:28 UTC


README

PHP library to manage Sign In with Apple identifier tokens, and validate them server side passed through by the iOS client. The liarary come from griffinledingham/php-apple-signin, original library require php version >= 7.0, According to my project needs, I need a libray match 5.6,so change => test => build this.

if you want to use origin library, Please use composer to install:

composer require griffinledingham/php-apple-signin

Installation

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

composer require monogatari/php-apple-signin

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);

?>