Open stephen-roadster opened 2 years ago
I have the same problem. Are there any updates?
@stephen-roadster I've faced the same issue too, but then I found the way how to fix it.
I'm assuming that you're setting up the gem based on README file. But the thing is that if you want to set up through Devise, you just need to skip OmniAuth paragraph. So If you use Devise, you don't need to create config/initializers/omniauth.rb
with config for Okta provider
It should completely solve your problem, including provider_ignores_state: true
Seems that when using the embed url for an app in Okta this is not working correctly. I end up getting an invalid credentials error
omniauth: (okta_oauth) Authentication failure! invalid_credentials: OAuth2::Error, invalid_grant: The authorization code is invalid or has expired.
Here are the logs returned in Okta when trying to sign in. Seems like it works until the last step it makes another call and the authorization code is somehow invalid (maybe this is a double use kind of situation?)
Here is the setup in initializers:
I noticed that I needed to set the
:provider_ignores_state
flag totrue
, otherwise I get a CSRF error which I also couldn't seem to resolve otherwise. For reference I'm onomniauth-okta
version0.1.3