Apple

socialiteproviders/apple image

Apple stats

Downloads
2.7M
Stars
39
Open Issues
2
Forks
42

View on GitHub →

Apple OAuth2 Provider for Laravel Socialite

Laravel SocialiteProviders/Apple Package

The socialiteproviders/apple package enables Laravel applications to authenticate users via Apple ID using Laravel Socialite. This integration simplifies the process of adding "Sign In with Apple" functionality to your application.

Key Features:

  • Simple Integration: Leverage Laravel Socialite for streamlined OAuth handling.
  • Configurable: Easily configure client IDs, secrets, and redirect URIs through Laravel's config/services.php.
  • Dynamic Client Secret Management: Supports generating JWT token-based client secrets with a maximum lifetime of 6 months, crucial for maintaining "Sign In with Apple" sessions.
  • Event Listening: Utilize Laravel's event system to hook into Socialite's OAuth flow.
  • User Data: Retrieve basic user information such as id, name, and email.

Installation:

  1. Require the Package:

    composer require socialiteproviders/apple
  2. Configuration: Add the following to your config/services.php:

    'apple' => [
    'client_id' => env('APPLE_CLIENT_ID'),
    'client_secret' => env('APPLE_CLIENT_SECRET'),
    'redirect' => env('APPLE_REDIRECT_URI')
    ],

    Refer to external guides for setting up Apple ID authentication and generating the client secret:

  3. Add Event Listener: Register the event listener in app/Providers/EventServiceProvider:

    protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
    \SocialiteProviders\Apple\AppleExtendSocialite::class.'@handle',
    ],
    ];

Basic Usage:

To initiate the authentication process, use:

return Socialite::driver('apple')->redirect();

Additional References:

This package provides a robust solution for integrating Apple's authentication system into Laravel projects, ensuring a smooth user experience with essential security features.

SocialiteProviders photo

Socialite Providers for Laravel

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Socialiteproviders Apple Related Articles

Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Securing Laravel logo

Securing Laravel

The essential security resource for Laravel devs, covering everything you need to keep your apps secure. Sign up to receive weekly security tips and monthly in depth articles, diving deep into security concepts you need to know!

Securing Laravel
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
LoadForge logo

LoadForge

Scalable load testing for web apps & APIs. Simulate real-world traffic and identify breaking points and performance limits with powerful, scalable load tests designed for Laravel.

LoadForge
Typesense Search logo

Typesense Search

Typesense is an open source, blazing-fast search engine, optimized for helping you build delightful search experiences for your sites and apps. Natively integrated with Laravel Scout.

Typesense Search