azimolabs / apple-sign-in-php-sdk Goto Github PK
View Code? Open in Web Editor NEWPHP library to verify and validate Apple IdentityToken and authenticate a user with Apple ID.
License: MIT License
PHP library to verify and validate Apple IdentityToken and authenticate a user with Apple ID.
License: MIT License
Hi!
Can you add new cryptographic algorithm YuyXoY
?
Does the example in the README even work? What / where is "JoseEncoder"?
Hi! I'm using PHP 7.4.3 and trying to verify identity token. The response I get: Uncaught JsonException: Malformed UTF-8 characters, possibly incorrectly encoded in /home/x/domains/domain.com/public_html/apple/lcobucci/jwt/src/Parsing/Decoder.php:50
. Changing to older PHP version helps, but is there any solution to make it working on >7.4.3? Thanks
Hi,
I got the error while getting access token from apple.
Implicit conversion of keys from strings is deprecated. Please use InMemory or LocalFileReference classes.
I find it cause by the problem from lcobucci/jwt 3.4.* , so I use "lcobucci/jwt": "3.3.*" in my project and it work perfectly.
The latest version of lcobucci/jwt is 4.1.x, but not released, I hasn't test it too.
We are using 1.1.2 version. What is the solution? Do you have idea?
Azimo\Apple\Api\Exception\UnsupportedCryptographicAlgorithmException
Cryptographic algorithm fh6Bs8C
is not supported. Supported algorithms: 86D88Kf,eXaunmL,YuyXoY,W6WcOKB
I have error frequently 30% happen at 1st time sign with apple
"Cryptographic algorithm W6WcOKB
is not supported. Supported algorithms: 86D88Kf,eXaunmL,YuyXoY
"
I use your lib code for Apple Sign feature!
Next times when I revoke apple id on app and sign again 2nd, it could be passed.
Can you add new cryptographic algorithm fh6Bs8C?
We use v3 version.
Hi!
Can you add new cryptographic algorithm eXaunmL?
Hi,
It looks like there was a possible change in Apple's API. It now seems the is_private_email and email_verified fields are now returned as boolean rather than a string. So the code in vendor/azimolabs/apple-sign-in-php-sdk/src/Auth/Factory/AppleJwtStructFactory.php:27
is not right anymore.
See response below: (I var_dumped $claims variable)
["email_verified"]=> bool(true) ["auth_time"]=> int(REDACTED) ["nonce_supported"]=> bool(true)
Not sure what's the best way to fix this, so submitting an issue. Possible a boolval() works?
Even trying with php vendor/bin/phpunit vendor/azimolabs/apple-sign-in-php-sdk/tests/E2e/Auth/AppleJwtFetchingServiceTest.php
with a recent token I'm only getting Validation of given token failed. Possibly token expired.
$validationData = new ValidationData();
$validationData->setIssuer('https://appleid.apple.com');
$validationData->setAudience('com.********');
$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()
);
$payload = $appleJwtFetchingService->getJwtPayload($request->id_token);
Because my project dependencies depend on ^3.4|^4.0
so i can't use this library for my project.
And i know this is huge breaking change if this library switch to latest lcobucci : (
https://appleid.apple.com/auth/keys
Cryptographic algorithm YuyXoY
is not supported. Supported algorithms: 86D88Kf,eXaunmL
I updated code to PHP8. If you need php8 right now, you can temporary use version from my repo. I didn't make PR because I dramatically changed the root service.
https://github.com/alxbndrs/apple-sign-in-php-sdk
[COMMIT] alxbndrs@c3166ce
Hello,
currently we have an issue relating to the cryptographic algorithm fh6Bs8C
.
We are using package version 1.3.0 currently.
Would it be possible to integrate this in the package? Or does it exist already?
Hello! The lcobucci/jwt package has a new major version that is currently not supported (see https://packagist.org/packages/lcobucci/jwt). Can we please release a new version that adds support for it? Thank you!
Hi, if I have two app (dev and prod) and they have different audience how can I handle that in this library?
At first I have tried this approach but it doesn't work since this library will throw exception when audience doesn't match.
new Auth\Jwt\JwtValidator(
new \Lcobucci\JWT\Validation\Validator(),
[
new \Lcobucci\JWT\Validation\Constraint\IssuedBy('https://appleid.apple.com'),
new \Lcobucci\JWT\Validation\Constraint\PermittedFor('com.c.azimo.stage'),
new \Lcobucci\JWT\Validation\Constraint\PermittedFor('com.c.azimo.stage2'),
]
),
Hi! Should be composer require azimolabs/apple-sign-in-php-sdk:1.2.0
in README.md
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.