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

EnvKit: A Local Development Stack for Laravel on Windows and macOS image

EnvKit: A Local Development Stack for Laravel on Windows and macOS

Read article
Clonio CLI: Clone Production Databases With Anonymized Data image

Clonio CLI: Clone Production Databases With Anonymized Data

Read article
Generate HTML Password Rules Attribute in Laravel 13.9.0 image

Generate HTML Password Rules Attribute in Laravel 13.9.0

Read article
Laravel Web Push Notifications image

Laravel Web Push Notifications

Read article
Laravel Mobile Pass: Generate Apple Wallet and Google Wallet Passes image

Laravel Mobile Pass: Generate Apple Wallet and Google Wallet Passes

Read article
FluentVox: AI Text-to-Speech for Laravel with Voice Cloning and GPU Acceleration image

FluentVox: AI Text-to-Speech for Laravel with Voice Cloning and GPU Acceleration

Read article
Curotec logo

Curotec

World class Laravel experts with GenAI dev skills. LATAM-based, embedded engineers that ship fast, communicate clearly, and elevate your product. No bloat, no BS.

Curotec
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Honeybadger logo

Honeybadger

Simple developer-focused application monitoring for Laravel. Error tracking, log management, uptime monitoring, status pages, and more!

Honeybadger
DreamzTech logo

DreamzTech

Hire 6-10+ Yrs. experienced skilled Laravel Developers from DreamzTech. We ensure NDA protected, 100% quality delivery. Contact Us & Discuss Your Need.

DreamzTech
Statamic logo

Statamic

The drop-in ready Laravel CMS you’re been waiting for. Go full-stack or headless, flat file or database – it’s up to you.

Statamic