Auth0 Home Blog Docs

Problem with authorization code flow on staging


#1

Hello guys,

I have implemented authorization to 3rd party service using authorization code flow. Everything runs great as long as I’m staying on localhost. But when going to staging I’m not redirected to callback url anymore. The flow on staging goes like this:

  • I’m invoking connect url with 3rd party service
  • I’m getting the code in query param from 3rd party.
  • In callback request, the response header ‘location’ should point me to my callback handler url with all kind of query params like access token, client id and stuff, instead it redirects me back to origin page. In my case it’s the typical ‘Allow access’ prompt window.

Some info:

  • I’m using grant-express for oauth flow
  • I’m trying to connect with basecamp API
  • on localhost there is no problem, the same code redirects me straight to my callback url with query params and all goes fine.
  • on staging I grab code but I’m not being redirected to callback
  • on local I’m using http1.1, on staging http2.0

I tried also with full callback url (including https://domain.com/callbackURL) on staging and it didn’t help.

Anyone had such a thing? Could somebody point me to the right direction? I can provide all necessary info if needed, screens, whatever You’d need to help me out.

Thanks in advance, Wojtek


#2

thought about the cors, but I’ve set cors to proper domain and problem still occured.