New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

nerdzlab/socialite-apple-sign-in

Extension of laravel/socialite package. Adds apple provider to sign in.
54,905 17
Install
composer require nerdzlab/socialite-apple-sign-in
Latest Version:2.2.2
PHP:^7.2|^8.0
Laravel:6 – 13
License:MIT
Last Updated:Mar 1, 2024
Links: GitHub  ·  Packagist
Maintainer: marko298

Sign in with apple

Good solution for implementation auth with apple for REST API. This package is extension of laravel/socialite package, it adds custom apple provider to socialite. It allows you to to create auth with apple flow using only apple's access_token. Package will check if token was not modified by validating token signature.

Installation

You can install the package via composer:

composer require nerdzlab/socialite-apple-sign-in

You may publish config if needed:

 php artisan vendor:publish --provider="Nerdzlab\SocialiteAppleSignIn\SocialiteAppleSignInServiceProvider" --tag="config"

Usage

To get started you need to add credentials for the apple service in your config/services.php file.

'apple' => [
    'client_id' => 'YOUR_BUNDLE_ID'
],

In case you have several apps, you may add several bundle ids as array.

'apple' => [
    'client_id' => [
        'FIRST_BUNDLE_ID',
        'SECOND_BUNDLE_ID',
    ]
],

Package automatically adds 'apple' driver to Socialite. After that you can obtain user data from access_token received from apple.

use Laravel\Socialite\Facades\Socialite;

$user = Socialite::driver('apple')->userFromToken($accessToken);

Package will cache public keys retrieved from apple during auth flow. You may automatically cache public keys by calling command:

php artisan apple-sign-in:update-keys

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

License

The MIT License (MIT). Please see License File for more information.

Related Packages

seoda/socialite-apple

Apple OAuth2 Provider for Laravel Socialite

29,092 10
cali/socialite

Laravel extension for OAuth libraries

26 0
revolution/socialite-mastodon

Socialite for Mastodon

310,248 13
revolution/socialite-amazon

Socialite for Login with Amazon

190,252 13

Version History

Version Released PHP License
2.2.2 ^7.2|^8.0 MIT
2.2.1 ^7.2|^8.0 MIT
2.2.0 ^7.2|^8.0 MIT
2.1.0 ^7.2 MIT
2.0.1 ^7.2 MIT