Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get id_token when OAuth2 v2.0.6 #10

Open
cc-nishizawa opened this issue Aug 5, 2022 · 1 comment
Open

Unable to get id_token when OAuth2 v2.0.6 #10

cc-nishizawa opened this issue Aug 5, 2022 · 1 comment

Comments

@cc-nishizawa
Copy link

A nil is returned at the following location.
https://github.com/Sage/omniauth-cognito-idp/blob/v0.1.1/lib/omniauth/strategies/cognito_idp.rb#L76

When I did this, it worked correctly.

      def id_token
        access_token.response.parsed['id_token']
      end
@lucasluitjes
Copy link

Can confirm. Using the following monkeypatch for now, based on your comment:

module OmniAuth
  module Strategies
    class CognitoIdP < OmniAuth::Strategies::OAuth2
      def id_token
        access_token.response.parsed['id_token']
      end
    end
  end
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants