joshp23 / YOURLS-OIDC

OpenID Connect Authentication for YOURLS
GNU General Public License v3.0
8 stars 7 forks source link

400 Bad Request Error with Okta #5

Open Swampcritter opened 3 years ago

Swampcritter commented 3 years ago

I configured the oidc part in the config.php with our Okta Preview (Development) server environment.

// oidc server define( 'OIDC_BASE_URL', 'okta-preview-url' ); define( 'OIDC_CLIENT_NAME', 'client-name' ); define( 'OIDC_CLIENT_SECRET', 'client-pass' ); // Option 1: link OIDC users to local YOURLS users //$oidc_profiles = array( // 'YOURLS_UNAME' => 'sub attribute from OIDC provider', //); // Option 2, all users on OIDC platform have YOURLS accounts. uses 'preferred_username' attribute define( 'OIDC_BYPASS_YOURLS_AUTH', true );

However, when I test it against said Okta site, it bombs out with a 400 Bad Request error:

Identity Provider: Unknown Error Code: invalid_request Description: The 'redirect_uri' parameter must be a Login redirect URI in the client app settings: https://wabtec-admin.oktapreview.com/admin/app/oidc_client/instance/0oaznkfjp4JQAdz3v0h7#tab-general

Is there something extra that needs to be configured on either the Okta side or the client side?

adrwh commented 3 years ago

Hello, did you get any feedback? I'd also like to hook up Okta.

I think the problem is because Okta OIDC wants to use authorization-code flow, rather then client credentials.

abdennour commented 3 years ago

in docs, there is user/config.php . who could tell me this path is relative to what ?

Shocktrooper commented 1 year ago

Was anyone able to figure this out. I have been also having issues with OKTA