Skip to content
This repository has been archived by the owner on May 31, 2022. It is now read-only.

sc-openauth/SocialiteOpenAuthProvider

Repository files navigation

OpenAuth.dev Provider for Laravel Socialite

openauth-icon

OpenAuth.dev Provider for Laravel Socialite

GitHub Workflow Status Packagist Version Packagist Downloads GitHub license


Table of contents

About the project

TBA

Getting started

Require the project:

composer require openauthdev/socialiteopenauthprovider

Ready! Now you can start with your project.

Configuration

First of all replace the service provider Laravel\Socialite\SocialiteServiceProvider in the config\app.php in providers[] with \SocialiteProviders\Manager\ServiceProvider::class.

Then we add the required event listener. Go to app/Providers/EventServiceProvider and add the following lines to the listen[] array.

\SocialiteProviders\Manager\SocialiteWasCalled::class => [
    'SocialiteProviders\\OpenAuth\\OpenAuthExtendSocialite@handle',
]

Finally, we just need to add the configuration instructions. To do this, add the following to the `config/services.php' file.

'openauth' => [
    'client_id' => env('OPENAUTH_CLIENT_ID'),
    'client_secret' => env('OPENAUTH_CLIENT_SECRET'),
    'redirect' => env('OPENAUTH_REDIRECT_URI')
]

The configuration is now complete.

Usage

Now you can use the OAuthProvider as usual with Sociallite.

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

Contributing

There are many ways to help this open source project. Write tutorials, improve documentation, share bugs with others, make feature requests, or just write code. We look forward to every contribution.

Versioning

We use SemVer for versioning. For available versions, see the tags on this repository.

Built with

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the LGPL-2.1 License - see the LICENSE file for details.