@owsleye
I had the same issue and I posted to the discussion my solution to your issue:
https://developer.okta.com/blog/2018/10/30/wordpress-authentication-with-okta
“Just wanted to add some points that might help others reading this article get your WP plugin to work.
I was getting 400 errors when logging in.(Identity Provider: Unknown, Error Code: invalid_request, Description: The ‘redirect_uri’ parameter must be an absolute URI that is whitelisted in the client app settings.) Spent a bunch of time trying to debug this and turns out that the solution to avoid this error is to enter for Login redirect URI as: https://yourdomain.com/wp-l… and for the initiate login URI https://yourdomain.com/wp-l… (make sure these match. In your screenshot you have an ending /
appended and when I added one I received the 400 error. I removed it and all worked as expected. I would also recommend readers go to (in Okta Dashboard > API > Trusted Origins and make sure the Redirect is set up correctly (this is automatically added when you create a web app but if you are experimenting they could get out of sync) Just double check that all URIs match EXACTLY.
You also mention taking the env.example.php to env.php. To do this I suggest cloning the repo locally. Create a new env.php file in the root of the repo you just cloned. Copy your env.example.php code to your env.php code. Update your client id and secret in your new env.php. Save it. Then compress that local repo into a .zip file
Then you can go to WordPress Dashboard > New Plugin and upload your zip file to WordPress. Click on Plugins to see the new Plugin and then activate it.
That is all you need to do with the env.php file. You don’t need to use composure and download dotenv or anything. Aaron has all the code needed for the plugin to read the env.php inside the plugin.
After reading the article and checking that you followed the steps I just outlined, you should be able to see the Okta Sign In widget when you visit, https://yourdomain.com/wp-l…
Then enter your Okta username and password credentials and you will be taken to the WP dashboard.
Please make sure you follow Aaron’s advice – “Make sure the email address on your Okta account matches the email address of your WordPress admin user, as that’s what will be used to match up Okta accounts to WordPress accounts.”
Another suggestion is that in this article Everyone was assigned to the WP app. Maybe create a group called WP Admins and put all your admins in that group and then assign that group to your WP app.”