PHP code example of augusl / comune-php-apple-signin
1. Go to this page and download the library: Download augusl/comune-php-apple-signin library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
augusl / comune-php-apple-signin example snippets
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);
bash
composer