Sign in with Apple for PHP alternatives and similar libraries
Based on the "Authentication and Authorization" category.
Alternatively, view Sign in with Apple for PHP alternatives based on common mentions on social networks and blogs.
A spec compliant, secure by default PHP OAuth 2.0 Server
8.7 7.6 L3 Sign in with Apple for PHP VS HybridAuthOpen source social sign on PHP Library. HybridAuth goal is to act as an abstract api between your application and various social apis and identities providers such as Facebook, Twitter and Google.
Easy integration with OAuth 2.0 service providers.
7.5 0.0 L5 Sign in with Apple for PHP VS OpauthMulti-provider authentication framework for PHP
7.1 2.2 L5 Sign in with Apple for PHP VS SentinelA framework agnostic authentication & authorization system.
6.2 0.0 L5 Sign in with Apple for PHP VS LockA flexible, driver based Acl package for PHP 5.4+
:atom: Social (OAuth1\OAuth2\OpenID\OpenIDConnect) sign with PHP :shipit:
Provides a unified interface to local and remote authentication systems.
2.9 0.0 L3 Sign in with Apple for PHP VS Multi-FactorVendor-Agnostic Two-Factor Authentication
Rinvex Authy is a simple wrapper for @Authy TOTP API, the best rated Two-Factor Authentication service for consumers, simplest 2fa Rest API for developers and a strong authentication platform for the enterprise.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of Sign in with Apple for PHP or a related project?
Sign-in with Apple SDK
Recommended and easiest way to installing library is through Composer.
composer require azimolabs/apple-sign-in-php-sdk
- PHP 7.1+
- OpenSSL Extension
How it works
This description assumes that you already have generated identityToken. Remember that token is valid ONLY for 10 minutes.
The first step to verify the identity token is to generate a public key. To generate public key
modulus values are required.
Both information are exposed in Apple API endpoint. Those values differ depending on the algorithm.
The second step is verification if provided
identityToken is valid against generated public key. If so we are sure that
identityToken wasn't malformed.
The third step is validation if token is not expired. Additionally it is worth to check
audience, examples are shown below.
Once you have cloned repository, make sure that composer dependencies are installed running
composer install -o.
$validationData = new ValidationData(); $validationData->setIssuer('https://appleid.apple.com'); $validationData->setAudience('com.azimo'); $appleJwtFetchingService = new Auth\Service\AppleJwtFetchingService( new Auth\Jwt\JwtParser(new Parser()), new Auth\Jwt\JwtVerifier( new Api\AppleApiClient( new GuzzleHttp\Client( [ 'base_uri' => 'https://appleid.apple.com', 'timeout' => 5, 'connect_timeout' => 5, ] ), new Api\Factory\ResponseFactory() ), new RSA(), new Sha256() ), new Auth\Jwt\JwtValidator($validationData), new Auth\Factory\AppleJwtStructFactory() ); $appleJwtFetchingService->getJwtPayload('your.identity.token');
If you don't want to copy-paste above code you can paste freshly generated
and run tests with simple command
php vendor/bin/phpunit tests/E2e.
```shell script $ php vendor/bin/phpunit tests/E2e PHPUnit 9.2.5 by Sebastian Bergmann and contributors.
Random seed: 1594414420
. 1 / 1 (100%)
Time: 00:00.962, Memory: 8.00 MB
OK (1 test, 1 assertion)
## Todo It is welcome to open a pull request with a fix of any issue: - [ ] Upgrade `lcobucci/jwt` to version `4.x`. Reported in: [Implicit conversion of keys from strings is deprecated. #2](https://github.com/AzimoLabs/apple-sign-in-php-sdk/issues/2) - [x] Make library compatible with PHP `7.4.3`. Reported in [Uncaught JsonException: Malformed UTF-8 characters](https://github.com/AzimoLabs/apple-sign-in-php-sdk/issues/4) - [ ] Make library compatible with PHP `8.0.0` ## Miscellaneous * [JSON web token](https://jwt.io/) * [Sign in with Apple overwiew](https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api/authenticating_users_with_sign_in_with_apple) * [How backend token verification works](https://sarunw.com/posts/sign-in-with-apple-3/) # Towards financial services available to all We’re working throughout the company to create faster, cheaper, and more available financial services all over the world, and here are some of the techniques that we’re utilizing. There’s still a long way ahead of us, and if you’d like to be part of that journey, check out our [careers page](https://bit.ly/3vajnu6).