tequilarapido/socialite-okta

Socialite OKTA provider

0.0.2 2016-12-09 16:52 UTC

This package is auto-updated.

Last update: 2024-10-24 05:54:00 UTC


README

Laravel Socialite [Okta] (https://www.okta.com) provider

Latest Version on Packagist Software License StyleCI Quality Score

! Deprecated !

Use this one instead. https://socialiteproviders.netlify.com/providers/okta.html

Contents

Installation

You can install the package using composer

$ composer require tequilarapido/socialite-okta

Usage

  • 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();

Security

If you discover any security related issues, please email nbourguig@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.