Okta auth integration not working #2151

Closed
opened 2026-02-05 03:06:53 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @z0mbix on GitHub (Mar 10, 2021).

Describe the issue
Bookstack is redirecting to a custom Okta auth server instead if the org auth server.

On login, I get redirected to https://xxxx.okta.com/oauth2/default/v1/authorize but this is the default custom auth server and only available when you have the "API Access Management" additional paid Okta feature.

Because of this Okta returns a 400 error with this page:

Screenshot 2021-03-10 at 12 27 27

Steps To Reproduce
Follow the doc: https://www.bookstackapp.com/docs/admin/third-party-auth/#okta

Create Okta app as described in the above doc, then set the following env vars:

OKTA_APP_SECRET=xxx
OKTA_APP_ID=xxx
OKTA_BASE_URL=https://xxxx.okta.com

Expected behavior
I would expect bookstack to redirect to the standard auth server:

https://xxxx.okta.com/oauth2/v1/authorize

instead of:

https://xxxx.okta.com/oauth2/default/v1/authorize

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): 0.31.4
  • PHP Version: 7.4.14
  • Hosting Method (Nginx/Apache/Docker): Docker (solidnerd/bookstack)

Additional context
https://support.okta.com/help/s/article/400-error-on-authentication-to-Okta-using-OIDC?language=en_US

I have looked at the socialite code and AFACT, should default to using the org auth server:

https://github.com/SocialiteProviders/Okta/blob/master/Provider.php

They even mention about using a custom auth server in the docs:

https://socialiteproviders.com/Okta/#custom-auth-server

Originally created by @z0mbix on GitHub (Mar 10, 2021). **Describe the issue** Bookstack is redirecting to a custom Okta auth server instead if the org auth server. On login, I get redirected to https://xxxx.okta.com/oauth2/default/v1/authorize but this is the default custom auth server and only available when you have the "API Access Management" additional paid Okta feature. Because of this Okta returns a `400` error with this page: <img width="828" alt="Screenshot 2021-03-10 at 12 27 27" src="https://user-images.githubusercontent.com/221251/110629544-2b85c380-819c-11eb-971d-44e390900027.png"> **Steps To Reproduce** Follow the doc: https://www.bookstackapp.com/docs/admin/third-party-auth/#okta Create Okta app as described in the above doc, then set the following env vars: ``` OKTA_APP_SECRET=xxx OKTA_APP_ID=xxx OKTA_BASE_URL=https://xxxx.okta.com ``` **Expected behavior** I would expect bookstack to redirect to the standard auth server: ``` https://xxxx.okta.com/oauth2/v1/authorize ``` instead of: ``` https://xxxx.okta.com/oauth2/default/v1/authorize ``` **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): `0.31.4` - PHP Version: `7.4.14` - Hosting Method (Nginx/Apache/Docker): Docker (`solidnerd/bookstack`) **Additional context** https://support.okta.com/help/s/article/400-error-on-authentication-to-Okta-using-OIDC?language=en_US I have looked at the socialite code and AFACT, should default to using the org auth server: https://github.com/SocialiteProviders/Okta/blob/master/Provider.php They even mention about using a custom auth server in the docs: https://socialiteproviders.com/Okta/#custom-auth-server
Author
Owner

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

Hi @z0mbix,
Sorry you're running into issues here.

Looks like this was something that was addressed upstream: https://github.com/SocialiteProviders/Providers/pull/615
As far as I can tell, we're using the patched version in the latest version of BookStack. Looking through our releases, this should be fixed from BookStack v0.31.5.

@ssddanbrown commented on GitHub (Mar 10, 2021): Hi @z0mbix, Sorry you're running into issues here. Looks like this was something that was addressed upstream: https://github.com/SocialiteProviders/Providers/pull/615 As far as I can tell, we're using the patched version in the latest version of BookStack. Looking through our releases, this should be fixed from BookStack v0.31.5.
Author
Owner

@z0mbix commented on GitHub (Mar 12, 2021):

Excellent, I’ve upgraded and it’s working as expected now. Thanks!

@z0mbix commented on GitHub (Mar 12, 2021): Excellent, I’ve upgraded and it’s working as expected now. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2151