{"id":33980859,"url":"https://github.com/sas1024/socialite-xenforo-bdapi","last_synced_at":"2026-04-22T06:02:56.693Z","repository":{"id":62540389,"uuid":"101579226","full_name":"sas1024/socialite-xenforo-bdapi","owner":"sas1024","description":"XenForo [bd] Api support for Laravel Socialite","archived":false,"fork":false,"pushed_at":"2017-08-27T21:55:28.000Z","size":4,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-14T16:15:31.360Z","etag":null,"topics":["bdapi","laravel","socialite-providers","xenforo"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sas1024.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-27T20:44:08.000Z","updated_at":"2023-05-04T12:52:43.000Z","dependencies_parsed_at":"2022-11-02T15:45:35.851Z","dependency_job_id":null,"html_url":"https://github.com/sas1024/socialite-xenforo-bdapi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sas1024/socialite-xenforo-bdapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sas1024%2Fsocialite-xenforo-bdapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sas1024%2Fsocialite-xenforo-bdapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sas1024%2Fsocialite-xenforo-bdapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sas1024%2Fsocialite-xenforo-bdapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sas1024","download_url":"https://codeload.github.com/sas1024/socialite-xenforo-bdapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sas1024%2Fsocialite-xenforo-bdapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32123604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"online","status_checked_at":"2026-04-22T02:00:05.693Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bdapi","laravel","socialite-providers","xenforo"],"created_at":"2025-12-13T03:30:37.389Z","updated_at":"2026-04-22T06:02:56.670Z","avatar_url":"https://github.com/sas1024.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XenForo [bd] Api Provider for Laravel Socialite\n\n## Installation and config\nInstall Larvel Socialite (see here: https://github.com/laravel/socialite/blob/2.0/readme.md)\n\nInstall the [bd] Api to your XenForo installation (see here: https://github.com/xfrocks/bdApi)\n\nInstall the XenForo [bd] Api socialite provider\n\n```\ncomposer require sas1024/socialite-xenforo-bdapi\n```\n\n## Add the Event and Listener\nAdd SocialiteProviders\\Manager\\SocialiteWasCalled::class event to your listen[] array in \u003capp_name\u003e/Providers/EventServiceProvider like this:\n```php\n    /**\n     * The event listener mappings for the application.\n     *\n     * @var array\n     */\n    protected $listen = [\n        'App\\Events\\Event' =\u003e [\n            'App\\Listeners\\EventListener',\n        ],\n        SocialiteWasCalled::class =\u003e [\n            'Sas1024\\Socialite\\XenForo\\XenForoExtendSocialite@handle',\n        ],\n    ];\n```\n\n## Services Array and .env:\nAdd to config/services.php:\n```php\n    'xenforo' =\u003e [\n        'client_id' =\u003e env('XENFORO_CLIENT_ID'),\n        'client_secret' =\u003e env('XENFORO_CLIENT_SECRET'),\n        'redirect' =\u003e env('XENFORO_CALLBACK_URL'),\n        'xenforo_url' =\u003e env('XENFORO_URL'),\n    ],\n```\nAppend provider values to your .env file: **Note: Add both public and secret keys!**\n```\nXENFORO_CLIENT_ID=\nXENFORO_CLIENT_SECRET=\nXENFORO_CALLBACK_URL=\nXENFORO_URL=\n```\n\nExample:\n```\nXENFORO_CLIENT_ID=kaupfd1fscx\nXENFORO_CLIENT_SECRET=oAnW4NUK1iHLl58PjpQI\nXENFORO_CALLBACK_URL=${APP_URL}/login/xenforo/callback\nXENFORO_URL=http://xenforo-with-bd.local/forum/api/\n```\n\n\n## Usage\n\n```php\n\u003c?php\n\nnamespace App\\Http\\Controllers\\Auth;\n\nuse Socialite;\n\nclass AuthController extends Controller\n{\n    /**\n     * Redirect the user to the XenForo [bd] Api authentication page.\n     *\n     * @return Response\n     */\n    public function redirectToProvider()\n    {\n        return Socialite::driver('xenforo')-\u003eredirect();\n    }\n\n    /**\n     * Obtain the user information from XenForo [bd] Api.\n     *\n     * @return Response\n     */\n    public function handleProviderCallback()\n    {\n        $user = Socialite::driver('xenforo')-\u003euser();\n    }\n}\n```\n\n## Retrieving User Details\n\nOnce you have a user instance, you can grab a few more details about the user:\n\n```php\n$user = Socialite::driver('xenforo')-\u003euser();\n\n$token = $user-\u003etoken;\n$expiresIn = $user-\u003eexpiresIn;\n$user-\u003eid;\n$user-\u003eavatar;\n$user-\u003enickname;\n$user-\u003eemail;\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsas1024%2Fsocialite-xenforo-bdapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsas1024%2Fsocialite-xenforo-bdapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsas1024%2Fsocialite-xenforo-bdapi/lists"}