Open BigMcLargeHuge opened 5 years ago
I find myself having the same issue. I don't even get an error message or anything that could be of help to debug this. Anyone?
Are you attempting to build a workflow along the lines of PKCE? https://github.com/omniauth/omniauth-oauth2/pull/131
@BigMcLargeHuge managed to find a solution?
I'm attempting to use Omniauth to implement an authorization code grant-type through Okta. I've implemented a strategy that is nearly identical to that in the okta omniauth gem. I've added the necessary code to the devise initializer and it easily retrieves the authorization code and grant type form the authorization endpoint. However, when it returns the parameters to the redirect_uri, I don't understand how to get the strategy to initiate the callback_phase method which is necessary to exchange the code for an access token with the token endpoint. As a result, the auth hash is not created so the User.from_omniauth call in my controller throws an error.
Question: How do I deliver the access code to my strategy to retrieve the access token?
Any help would be greatly appreciated.
Strategy:
controller callback
initializer/devise.rb
config.omniauth(:moto, AUTH['oauth2']['moto']['OKTA_CLIENT_ID'], AUTH['oauth2']['moto']