//安装类:composer require griffinledingham/php-apple-signin

<?php
use AppleSignIn\ASDecoder;

//由ios传过来这两个参数
$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); ?>

 

版权声明:本文为dream-meng原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/dream-meng/p/14384853.html