GriffinLedingham / php-apple-signin

🗝 Decode Apple Sign In client tokens in PHP
BSD 3-Clause "New" or "Revised" License
200 stars 87 forks source link

Need to install it without composer #15

Open grappetite-tahir opened 4 years ago

grappetite-tahir commented 4 years ago

Hello support, I'm using the older version of Codeigniter and it has no support for composer, can you let me know if I can install it without using the composer? Thank you so much.

welove commented 4 years ago

me too!

yanlong-li commented 4 years ago

Download the code to a directory and import all. PHP files manually

v1.1 example:

<?php
include './extends/php-apple-sign/ASDecoder.php';
include './extends/php-apple-sign/Vendor/JWK.php';
include './extends/php-apple-sign/Vendor/JWT.php';
marioshtika commented 4 years ago

Take a look at this.

I needed the same thing so a made a slightly different version of it.

P.s. I would not recommend passing the token through, by the iOS client.

eddyson1006 commented 4 years ago

You can still make use of this library in Codeigniter @grappetite-tahir @welove 1) Edit $config['composer_autoload'] = TRUE; in config.php. 2) Terminal/cd into application folder and run composer require griffinledingham/php-apple-signin. The library will be installed and auto loaded through default path of application/vendor/autoload.php. 3) Make use of the library by initializing new object from ASDecoder class $appleSignInPayload = new \AppleSignIn\ASDecoder(); $appleSignInPayload = $appleSignInPayload->getAppleSignInPayload($identityToken); $email = $appleSignInPayload->getEmail(); $user = $appleSignInPayload->getUser(); $isValid = $appleSignInPayload->verifyUser($clientUser);