OKTA with new release v0.19 #561

Closed
opened 2026-02-04 21:01:08 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @jacksonp2008 on GitHub (Jan 30, 2018).

For Bug Reports

  • BookStack Version (Found in settings, Please don't put 'latest'): BookStack v0.19.0
  • PHP Version: PHP 7.0.22-0ubuntu0.16.04.1 (cli) ( NTS )
    Copyright (c) 1997-2017 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.22-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
  • MySQL Version: mysql --version
    mysql Ver 14.14 Distrib 5.7.21, for Linux (x86_64) using EditLine wrapper

I did a completely fresh install on Ubuntu 16.04 using your script:
https://www.bookstackapp.com/docs/admin/installation/#ubuntu-1604

Expected Behavior

Expected OKTA Login to function, local login works fine. Followed instructions from here:

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

Current Behavior

Returns: "Sorry, The page you were looking for could not be found."
URL is: http://nbs.lab.fsu.com/oauth2/v1/authorize?client_id=0oahn7cgekUVrKBgv0x7&redirect_uri=http%3A%2F%2Fnbs.lab.fsu.com%2F%2Flogin%2Fservice%2Fokta%2Fcallback&scope=openid+profile+email&response_type=code&state=7cKCbkwvn1VsT3LDFODiIGPCikVWaUPokg4BzUkF

Steps to Reproduce

.env set to:

OKTA Settings

OKTA_BASE_URL=https://fs.okta.com/
APP_URL=http://nbs.lab.fsu.com/
OKTA_APP_ID=0oxxxxxxapp_id
OKTA_APP_SECRET=Iong_string_client-Secret

OKTA App has the following redirect URI
screen shot 2018-01-29 at 17 15 09

Originally created by @jacksonp2008 on GitHub (Jan 30, 2018). ### For Bug Reports * BookStack Version *(Found in settings, Please don't put 'latest')*: BookStack v0.19.0 * PHP Version: PHP 7.0.22-0ubuntu0.16.04.1 (cli) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.22-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies * MySQL Version: mysql --version mysql Ver 14.14 Distrib 5.7.21, for Linux (x86_64) using EditLine wrapper I did a completely fresh install on Ubuntu 16.04 using your script: https://www.bookstackapp.com/docs/admin/installation/#ubuntu-1604 ##### Expected Behavior Expected OKTA Login to function, local login works fine. Followed instructions from here: https://www.bookstackapp.com/docs/admin/third-party-auth/#okta ##### Current Behavior Returns: "Sorry, The page you were looking for could not be found." URL is: http://nbs.lab.fsu.com/oauth2/v1/authorize?client_id=0oahn7cgekUVrKBgv0x7&redirect_uri=http%3A%2F%2Fnbs.lab.fsu.com%2F%2Flogin%2Fservice%2Fokta%2Fcallback&scope=openid+profile+email&response_type=code&state=7cKCbkwvn1VsT3LDFODiIGPCikVWaUPokg4BzUkF ##### Steps to Reproduce .env set to: # OKTA Settings OKTA_BASE_URL=https://fs.okta.com/ APP_URL=http://nbs.lab.fsu.com/ OKTA_APP_ID=0oxxxxxxapp_id OKTA_APP_SECRET=Iong_string_client-Secret OKTA App has the following redirect URI <img width="687" alt="screen shot 2018-01-29 at 17 15 09" src="https://user-images.githubusercontent.com/1813327/35543082-fe2dfcd0-0517-11e8-98d0-82fcc262f68b.png">
OVERLORD added the 🐕 Support label 2026-02-04 21:01:08 +03:00
Author
Owner

@lommes commented on GitHub (Jan 31, 2018):

That's strange since the URL should be using OKTA_BASE_URL before oauth2/v1/authorize but seems to be using your APP_URL

@lommes commented on GitHub (Jan 31, 2018): That's strange since the URL should be using OKTA_BASE_URL before ```oauth2/v1/authorize``` but seems to be using your APP_URL
Author
Owner

@jacksonp2008 commented on GitHub (Jan 31, 2018):

Did you want me to switch them or try something?

@jacksonp2008 commented on GitHub (Jan 31, 2018): Did you want me to switch them or try something?
Author
Owner
@lommes commented on GitHub (Jan 31, 2018): I will setup a clean install for testing. You can try, if calling https://fs.okta.com/oauth2/v1/authorize?client_id=0oahn7cgekUVrKBgv0x7&redirect_uri=http%3A%2F%2Fnbs.lab.fsu.com%2F%2Flogin%2Fservice%2Fokta%2Fcallback&scope=openid+profile+email&response_type=code&state=7cKCbkwvn1VsT3LDFODiIGPCikVWaUPokg4BzUkF manually works for you.
Author
Owner

@lommes commented on GitHub (Jan 31, 2018):

Ok, I just tried with a clean install and it works for me, without any issues (after changing the wrong keys in .env)

I get redirected to OKTA_BASE_URL/oauth2/v1/authorize... which is correct. Is it possible you used wrong settings first? It might be possible that you have to clear the cached env parameters with php artisan cache:clear first. Restarting the server should fix this I think.

@lommes commented on GitHub (Jan 31, 2018): Ok, I just tried with a clean install and it works for me, without any issues (after changing the wrong keys in .env) I get redirected to OKTA_BASE_URL/oauth2/v1/authorize... which is correct. Is it possible you used wrong settings first? It might be possible that you have to clear the cached env parameters with ```php artisan cache:clear``` first. Restarting the server should fix this I think.
Author
Owner

@domainzero commented on GitHub (Mar 7, 2018):

@ssddanbrown Looks like this got fixed in #692 - should be good to close.

@domainzero commented on GitHub (Mar 7, 2018): @ssddanbrown Looks like this got fixed in #692 - should be good to close.
Author
Owner

@ssddanbrown commented on GitHub (Mar 10, 2018):

@domainzero Ah, Thanks for bringing this up

@ssddanbrown commented on GitHub (Mar 10, 2018): @domainzero Ah, Thanks for bringing this up
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#561