jhaoda/socialite-mailru 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jhaoda/socialite-mailru

最新稳定版本:v4.0.0

Composer 安装命令:

composer require jhaoda/socialite-mailru

包简介

Mail.ru OAuth2 Provider for Laravel Socialite

README 文档

README

1. Installation

composer require jhaoda/socialite-mailru

2. Service Provider

  • Remove Laravel\Socialite\SocialiteServiceProvider from your providers[] array in config\app.php if you have added it already.
  • Add SocialiteProviders\Manager\ServiceProvider to your providers[] array in config\app.php.

For example:

'providers' => [ // a whole bunch of providers // remove 'Laravel\Socialite\SocialiteServiceProvider', SocialiteProviders\Manager\ServiceProvider::class, // add ];
  • Note: If you would like to use the Socialite Facade, you need to install it.

3. Add the Event and Listeners

  • Add SocialiteProviders\Manager\SocialiteWasCalled::class event to your listen[] array in <app_name>/Providers/EventServiceProvider.

  • Add your listeners (i.e. the ones from the providers) to the SocialiteProviders\Manager\SocialiteWasCalled[] that you just created.

  • The listener that you add for this provider is JhaoDa\SocialiteProviders\MailRu\MailRuExtendSocialite::class.

  • Note: You do not need to add anything for the built-in socialite providers unless you override them with your own providers.

For example:

/**  * The event handler mappings for the application.  *  * @var array  */ protected $listen = [ SocialiteProviders\Manager\SocialiteWasCalled::class => [ JhaoDa\SocialiteProviders\MailRu\MailRuExtendSocialite::class ], ];

4. Services Array and .env

Add to config/services.php:

'mailru' => [ 'client_id' => env('MAILRU_ID'), 'client_secret' => env('MAILRU_SECRET'), 'redirect' => env('MAILRU_REDIRECT'), ],

Append provider values to your .env file:

// other values above MAILRU_ID=your_app_id_for_the_service MAILRU_SECRET=your_app_secret_for_the_service MAILRU_REDIRECT=https://example.com/login 

统计信息

  • 总下载量: 64.3k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 23
  • 点击次数: 3
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 23
  • Watchers: 4
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固