jimchen / php-apple-signin
A simple library to decode and parse Apple Sign In client tokens.
v1.0.0
2020-06-15 06:32 UTC
Requires
- php: >=7.0
- ext-json: *
- ext-openssl: *
- lcobucci/jwt: ^3.0|^4.0
Requires (Dev)
- roave/security-advisories: dev-master
This package is auto-updated.
Last update: 2025-03-15 17:02:49 UTC
README
PHP library to manage Sign In with Apple identifier tokens, and validate them server side passed through by the iOS client.
Installing
$ composer require jimchen/php-apple-signin -vvv
Usage
<?php use JimChen\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); ?>
Contributing
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- Contribute new features or update the wiki.
The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.
License
MIT