Hello, I'm looking to enable users to Login with Constant Contact to our Rails application, using the Omniauth-ConstantContact2 gem with Devise. We initialize the providers as devise requires, including scope for constant contact: config.omniauth :google_oauth2, ENV['GOOGLE_CLIENT'], ENV['GOOGLE_SECRET']
if ENV['HUBSPOT_CLIENT_ID']
config.omniauth :hubspot, ENV['HUBSPOT_CLIENT_ID'], ENV['HUBSPOT_SECRET_ID'], scope: 'contacts timeline'
end
if ENV['CC_KEY']
config.omniauth :constantcontact, ENV['CC_KEY'], ENV['CC_SECRET'], scope: 'contact_data'
end When we hit the authentication URL: http://localhost:3000/users/auth/constantcontact The URL we are then taken to is: https://login.constantcontact.com/login/?goto=https://oauth2.constantcontact.com/oauth2/oauth/login?response_type=code&wb=false&oauthflow=true Upon entering username and password, the page simply ends up refreshing. It looks like the authorization succeeds, and then immediately logs the user out and refreshes the page. Here are the network requests: The redirect URI should be http://localhost:3000/users/auth/callback/constantcontact, but we are never taken back there. We currently have Google, Slack, and HubSpot OAuth all working in this same way and cannot figure out what we are doing wrong here. Our API and secret keys are setup, the redirect URIs are listed in the application, we are passing a simple contact_data scope as shown in the code sample above. We never receive a "invalid redirect uri" or similar error, the page simply always refreshes. This happens in all browsers. What can we do to enable oauth authentication within our Rails app? Happy to provide any information needed!
... View more