Laravel Socialite [Okta] (https://www.okta.com) provider
Use this one instead. https://socialiteproviders.netlify.com/providers/okta.html
You can install the package using composer
$ composer require tequilarapido/socialite-okta
- Add service provider to
config/app.php
Tequilarapido\Okta\OktaServiceProvider::class,
-
If you already use Socialite in your app, remove the socialite service provider from
config/app.php
-
Add Socialite alias
'Socialite' => Laravel\Socialite\Facades\Socialite::class,
- Add this entries to
config/services.php
'okta' => [
'url' => env('OKTA_URL'),
'client_id' => env('OKTA_CLIENT_ID'),
'client_secret' => env('OKTA_CLIENT_SECRET'),
'redirect' => env('OKTA_REDIRECT'),
],
- Add config variables to your .env file
# Okta
OKTA_URL=https://xxx.okta.com or https://xxx.oktapreview.com
OKTA_REDIRECT=http://your-app-url/{callback-route-uri}
OKTA_CLIENT_ID=XXX
OKTA_CLIENT_SECRET=XXX
- Use like any other Socialite driver
[Laravel Socialite Documentation] (https://laravel.com/docs/5.0/authentication#social-authentication)
// To get the auhtorization redirect
return Socialite::with('okta')->redirect();
// To get the okta user
$oktaUser = Socialite::driver('okta')->user();
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.