Constant Contact Logo
Community Home
Get Inspired
  • Expert Advice
  • Share & Get Ideas
Learn & Grow
  • Commonly Asked Questions
  • Community Know-How
  • Get Started With SMS
  • Onboarding Hub
  • It's goal time.
Support
  • API Developer Support
  • Give Feedback
  • Get Help
  • Help Center
Announcements
  • Announcements
  • Constant Contact News
  • Welcome Center
My Rewards
  • Sign up free
  • Log in
  • Constant Contact Community
  • :
  • About BrettL475

About BrettL475

BrettL475
BrettL475
Participant
since ‎07-08-2021
‎09-13-2021
1
Post
0
Kudos
0
Solutions
Badges
First Topic
View All
Latest Contributions by BrettL475
  • Topics BrettL475 has Participated In
  • Latest Contributions by BrettL475

Ruby on Rails OAuth2 Endless Refreshing, never red...

by BrettL475 in API Developer Support
‎09-13-2021 05:01 PM
‎09-13-2021 05:01 PM
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
  • Tags:
  • callback
  • devise
  • oAuth2
  • omniauth
  • rails
  • redirect uri
Latest Tags
  • callback
  • devise
  • oAuth2
  • omniauth
  • rails
  • redirect uri
View All
  • © Constant Contact, Inc. 1996-2023
  • Terms
  • Community Terms
  • Community Guidelines
  • Privacy
  • Vulnerability Disclosure