[PR #568] [CLOSED] Adding OKTA Single Sign-on Support #5670

Closed
opened 2026-02-05 10:13:47 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/568
Author: @forescout-spollock
Created: 10/23/2017
Status: Closed

Base: masterHead: master


📝 Commits (2)

📊 Changes

855 files changed (+109032 additions, -3 deletions)

View changed files

.DS_Store (+0 -0)
📝 .gitignore (+0 -1)
📝 app/Services/SocialAuthService.php (+1 -1)
📝 config/services.php (+9 -1)
resources/assets/icons/okta.svg (+42 -0)
vendor/.DS_Store (+0 -0)
vendor/laravel/browser-kit-testing/LICENSE.md (+21 -0)
vendor/laravel/browser-kit-testing/composer.json (+29 -0)
vendor/laravel/browser-kit-testing/readme.md (+30 -0)
vendor/laravel/browser-kit-testing/src/Concerns/ImpersonatesUsers.php (+34 -0)
vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithAuthentication.php (+115 -0)
vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithConsole.php (+27 -0)
vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithContainer.php (+20 -0)
vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithDatabase.php (+89 -0)
vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithPages.php (+753 -0)
vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithSession.php (+162 -0)
vendor/laravel/browser-kit-testing/src/Concerns/MakesHttpRequests.php (+874 -0)
vendor/laravel/browser-kit-testing/src/Concerns/MocksApplicationServices.php (+421 -0)
vendor/laravel/browser-kit-testing/src/Constraints/FormFieldConstraint.php (+82 -0)
vendor/laravel/browser-kit-testing/src/Constraints/HasElement.php (+99 -0)

...and 80 more files

📄 Description

  1. In the .env file add

OKTA_URL=https://dev-454412.oktapreview.com/
OKTA_REDIRECT=http://servername/login/service/okta/callback
OKTA_CLIENT_ID=fsxxxxxxxdfg
OKTA_CLIENT_SECRET= fsdxxxxx-xxxxx-xxxxxx3

Replacing the OKTA_URL,OKTA_REDIRECT,OKTA_CLIENT_ID,OKTA_CLIENT_SECRET with your respective values.

You can sign up for a development account at developer.okta.com - the application type should be web, redirect URI: wiki.com/login/service/okta/callback

Manual installation steps are:

Add the file okta.svg to BookStack/resources/assets/icons

3.Add the file
BookStack/vendor/laravel/socialite/src/Two/OktaProvider.php

In BookStack/config/services.php
add

'okta' => [
'url' => env('OKTA_URL'),
'client_id' => env('OKTA_CLIENT_ID'),
'client_secret' => env('OKTA_CLIENT_SECRET'),
'redirect' => env('OKTA_REDIRECT'),
'name'          => 'Okta',
]

In BookStack/app/Services/SocialAuthService.php add to the variable $validSocialDrivers okta
i.e
protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter', 'azure','okta'];

In BookStack/vendor/laravel/socialite/src/SocialiteManager.php add

public function createOktaDriver() {
$config = $this->app ['config'] ['services.okta'];

	$provider = $this->buildProvider ( 'Laravel\Socialite\Two\OktaProvider', $config );
	
	$provider->setOktaUrl ( $config ['url'] );
	
	return $provider;
}

In BookStack/config/setting-defaults.php change registration-enabled to true
i.e 'registration-enabled' => true,


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/568 **Author:** [@forescout-spollock](https://github.com/forescout-spollock) **Created:** 10/23/2017 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (2) - [`344b73f`](https://github.com/BookStackApp/BookStack/commit/344b73febb86c8115bea99332c315c6eaaefdc36) adding OKTA SSO Support - [`9749eac`](https://github.com/BookStackApp/BookStack/commit/9749eac81899eff4517bc4015d55217d87b8d023) Okta SSO Support ### 📊 Changes **855 files changed** (+109032 additions, -3 deletions) <details> <summary>View changed files</summary> ➕ `.DS_Store` (+0 -0) 📝 `.gitignore` (+0 -1) 📝 `app/Services/SocialAuthService.php` (+1 -1) 📝 `config/services.php` (+9 -1) ➕ `resources/assets/icons/okta.svg` (+42 -0) ➕ `vendor/.DS_Store` (+0 -0) ➕ `vendor/laravel/browser-kit-testing/LICENSE.md` (+21 -0) ➕ `vendor/laravel/browser-kit-testing/composer.json` (+29 -0) ➕ `vendor/laravel/browser-kit-testing/readme.md` (+30 -0) ➕ `vendor/laravel/browser-kit-testing/src/Concerns/ImpersonatesUsers.php` (+34 -0) ➕ `vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithAuthentication.php` (+115 -0) ➕ `vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithConsole.php` (+27 -0) ➕ `vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithContainer.php` (+20 -0) ➕ `vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithDatabase.php` (+89 -0) ➕ `vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithPages.php` (+753 -0) ➕ `vendor/laravel/browser-kit-testing/src/Concerns/InteractsWithSession.php` (+162 -0) ➕ `vendor/laravel/browser-kit-testing/src/Concerns/MakesHttpRequests.php` (+874 -0) ➕ `vendor/laravel/browser-kit-testing/src/Concerns/MocksApplicationServices.php` (+421 -0) ➕ `vendor/laravel/browser-kit-testing/src/Constraints/FormFieldConstraint.php` (+82 -0) ➕ `vendor/laravel/browser-kit-testing/src/Constraints/HasElement.php` (+99 -0) _...and 80 more files_ </details> ### 📄 Description 1. In the .env file add OKTA_URL=https://dev-454412.oktapreview.com/ OKTA_REDIRECT=http://servername/login/service/okta/callback OKTA_CLIENT_ID=fsxxxxxxxdfg OKTA_CLIENT_SECRET= fsdxxxxx-xxxxx-xxxxxx3 Replacing the OKTA_URL,OKTA_REDIRECT,OKTA_CLIENT_ID,OKTA_CLIENT_SECRET with your respective values. You can sign up for a development account at developer.okta.com - the application type should be web, redirect URI: wiki.com/login/service/okta/callback Manual installation steps are: 2. Add the file okta.svg to BookStack/resources/assets/icons 3.Add the file BookStack/vendor/laravel/socialite/src/Two/OktaProvider.php 4. In BookStack/config/services.php add 'okta' => [ 'url' => env('OKTA_URL'), 'client_id' => env('OKTA_CLIENT_ID'), 'client_secret' => env('OKTA_CLIENT_SECRET'), 'redirect' => env('OKTA_REDIRECT'), 'name' => 'Okta', ] 5. In BookStack/app/Services/SocialAuthService.php add to the variable $validSocialDrivers okta i.e protected $validSocialDrivers = ['google', 'github', 'facebook', 'slack', 'twitter', 'azure','okta']; 6. In BookStack/vendor/laravel/socialite/src/SocialiteManager.php add public function createOktaDriver() { $config = $this->app ['config'] ['services.okta']; $provider = $this->buildProvider ( 'Laravel\Socialite\Two\OktaProvider', $config ); $provider->setOktaUrl ( $config ['url'] ); return $provider; } 7. In BookStack/config/setting-defaults.php change registration-enabled to true i.e 'registration-enabled' => true, --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:13:47 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5670