Page Not Found for Okta login #2393

Closed
opened 2026-02-05 03:56:10 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @tylerpixelguild on GitHub (Sep 14, 2021).

Describe the bug

I get a "Page Not Found" response when clicking on the "Login with Okta" button from the login screen.

Steps To Reproduce

I followed the steps here to generate my app id and secret in okra, sensitive values replaced below:

https://www.bookstackapp.com/docs/admin/third-party-auth/#okta

I set these values in my .env file:
OKTA_APP_ID=0oXXXXXXXXXXXXX
OKTA_APP_SECRET=MP-XXXXXXXXXXXXXXXXXXXXXXXXX
OKTA_BASE_URL=myoktasubdomain
APP_URL=https://docs.mybookstackdomain.com

Then from the login screen click on the "Login with Okta" button and get a "Page Not Found" error when trying to resolve this URL format:

https://docs.mybookstackdomain.com/login/service/myoktasubdomain/oauth2/v1/authorize?client_id=0oXXXXXXXXXXXXX&redirect_uri=https%3A%2F%2Fdocs.mybookstackdomain.com%2Flogin%2Fservice%2Fokta%2Fcallback&scope=openid+profile+email&response_type=code&state=b1SAJxmhbY2QfQUWuZRY1LfeFzTKU4wxhURNFYBd

I also tried after running the following commands with no luck:
composer dump-autoload
php artisan config:clear
php artisan route:clear
php artisan view:clear
php artisan cache:clear
php artisan optimize:clear

Expected behavior
Authenticate me through Okta

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): BookStack v21.05.3
  • PHP Version: PHP 7.4.21
  • Hosting Method (Nginx/Apache/Docker): Apache/2.4.29 (Ubuntu)
Originally created by @tylerpixelguild on GitHub (Sep 14, 2021). **Describe the bug** I get a "Page Not Found" response when clicking on the "Login with Okta" button from the login screen. **Steps To Reproduce** I followed the steps here to generate my app id and secret in okra, sensitive values replaced below: https://www.bookstackapp.com/docs/admin/third-party-auth/#okta I set these values in my .env file: OKTA_APP_ID=0oXXXXXXXXXXXXX OKTA_APP_SECRET=MP-XXXXXXXXXXXXXXXXXXXXXXXXX OKTA_BASE_URL=myoktasubdomain APP_URL=https://docs.mybookstackdomain.com Then from the login screen click on the "Login with Okta" button and get a "Page Not Found" error when trying to resolve this URL format: https://docs.mybookstackdomain.com/login/service/myoktasubdomain/oauth2/v1/authorize?client_id=0oXXXXXXXXXXXXX&redirect_uri=https%3A%2F%2Fdocs.mybookstackdomain.com%2Flogin%2Fservice%2Fokta%2Fcallback&scope=openid+profile+email&response_type=code&state=b1SAJxmhbY2QfQUWuZRY1LfeFzTKU4wxhURNFYBd I also tried after running the following commands with no luck: composer dump-autoload php artisan config:clear php artisan route:clear php artisan view:clear php artisan cache:clear php artisan optimize:clear **Expected behavior** Authenticate me through Okta **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): BookStack v21.05.3 - PHP Version: PHP 7.4.21 - Hosting Method (Nginx/Apache/Docker): Apache/2.4.29 (Ubuntu)
Author
Owner

@ssddanbrown commented on GitHub (Sep 15, 2021):

Hi @tylerpixelguild,
The OKTA_BASE_URL needs to be a valid base URL, not just the subdomain, So everything up to the okta.com part (If existing.)

@ssddanbrown commented on GitHub (Sep 15, 2021): Hi @tylerpixelguild, The `OKTA_BASE_URL` needs to be a valid base URL, not just the subdomain, So everything up to the okta.com part (If existing.)
Author
Owner

@tylerpixelguild commented on GitHub (Sep 16, 2021):

Doh! misread the docs. Thanks

@tylerpixelguild commented on GitHub (Sep 16, 2021): Doh! misread the docs. Thanks
Author
Owner

@ssddanbrown commented on GitHub (Sep 17, 2021):

No worries! Will therefore close.

@ssddanbrown commented on GitHub (Sep 17, 2021): No worries! Will therefore close.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2393