定制 thecoati/socialite-cfx-provider 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

thecoati/socialite-cfx-provider

最新稳定版本:v1.0.0

Composer 安装命令:

composer require thecoati/socialite-cfx-provider

包简介

README 文档

README

Cfx.re Laravel socialite adapter for authenticating with FiveM and RedM.

Table of Contents

Requirements

Installation

  • Install dependencies composer require thecoati/socialite-cfx-provider.
  • Generate RSA public and private key php artisan cfx:keys.
  • Add the following lines to your .env:
CFX_APP_NAME=Laravel
CFX_CLIENT_ID=UNIQUE_CLIENT_ID
CFX_REDIRECT_URL=http://127.0.0.1:8000/callback
CFX_AVATAR_SIZE=128

Alternatively, you can also publish the configuration file using php artisan vendor:publish --tag=cfx-config.

The CFX_APP_NAME is the application name listed at the apps page.
Make sure to generate a *random and unique CFX_CLIENT_ID you can generate this key yourself.
The CFX_AVATAR_SIZE determines the size at which the avatar is returned. Please note that values lower than 8 and higher than 1000 will result in a blank avatar. This is because Discourse has hardcoded these limits in their avatar controller.
Unless a real OAuth flow Discourse forums do not require any way of application registration.

Scopes

Available Discourse user API key scopes.
https://github.com/discourse/discourse/blob/main/app/models/user_api_key_scope.rb

  • read
  • write
  • message_bus
  • push
  • one_time_password
  • notifications
  • session_info *Required
  • bookmarks_calendar

Disclaimer

Unfortunately Discourse (community software used on forum.cfx.re) does not provide a full OAuth2 flow.
We modified the authentication flow of Socialite to match the authentication flow of Discourse.
Therefore It might be possible that Socialite features behave differently than expected.
Also note that there is no email scope available to obtain the users email.

For more information on the Discourse user API authentication see:
https://meta.discourse.org/t/user-api-keys-specification/48536

统计信息

  • 总下载量: 4.98k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-30