OAuth2 Credentials failing at multiple points

Describe the problem/error/question

I’ve been trying to set up credentials for the Faire custom integration API over the past week. All I’d like to do is be able to pull orders on a schedule. You can view the API documentation here: Faire - Developers
It seems like a pretty straightforward OAuth2 flow; however, I’ve run into a couple different issues and have not been able to connect. These are not issues I’ve experienced in the past and would love to know if anybody has any work-arounds.
The first issue I encountered looks to me like a callback failure. I press the connect button in the credentials section of an HTTP Request node after filling out all relevant information and check the box to authorize my app; afterwards, though, I’m met with “An error occurred, redirecting back…”, at which point the authorization pop-up window freezes and I get no other discerning information. I’ve done this exact process dozens of times before for different APIs with no issue.
During other attempts I will receive an actual 404 error. This one is interesting because I can see the authorization code being passed back in the URL of the pop-up window, but N8N can’t seem to capture it.
What is going on here? I’ve spent a lot of time tinkering with my credentials and rereading the documentation with no progress. I’ve reached out to Faire support 5 times now with no help at all. It doesn’t even seem like they know what I’m talking about.
I’m not sure which part of my workflow would be useful to share here, as I currently on have one HTTP Request node and my issue is with setting up the actual credentials.
Any help would be appreciated.

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 2.22.6
  • Database (default: SQLite): Default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): Default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system:

Hi @turunenpayton

The issues you are facing with your Faire integration are almost certainly caused by a mismatch between the redirect URL registered in your Faire developer account and the one n8n is sending. When you click the connect button, n8n sends a request to Faire that includes a specific callback URL. If that URL does not match the one you saved in the Faire portal character-for-character, the authorization will be rejected. This is why you are seeing errors or getting stuck in a loop; the systems are essentially failing to “hand off” the security token to each other because they aren’t agreeing on where to send it.

To resolve this, carefully copy the exact OAuth Redirect URL provided in your n8n credential window and ensure it is the only one listed in your Faire app settings, paying close attention to any trailing slashes or sub-paths. Sometimes, browser security extensions or ad blockers can also interfere with this process, so please try running the connection flow inside an Incognito or Private browser window to rule out any local interference.

If it still fails, the most important step is to open your browser’s Developer Tools (press F12) and check the “Network” tab while you attempt the connection. Look for the specific request that fails and check the “Response” or “Preview” section; this will often reveal the exact reason for the rejection, such as a “redirect_uri_mismatch” or “invalid_scope” error. Sharing that specific error message is the fastest way to pinpoint exactly which setting needs to be adjusted in your Faire developer portal.

Welcome @turunenpayton to our community! I’m Jay and I am a n8n verified creator.

The “redirecting back…” freeze on n8n Cloud is very often caused by a browser extension (ad blockers, Privacy Badger, uBlock) killing the OAuth popup before the callback completes - the fastest test is to retry in an incognito window with all extensions disabled. If that unblocks the flow, the extension is the culprit.

For Faire specifically, confirm the redirect URI in their developer portal is exactly https://oauth.n8n.cloud/oauth2/callback with no trailing slash - even a single character difference causes a silent redirect failure.

For the 404 variant where you can see the auth code in the URL but n8n misses it: that usually means the popup closed before n8n could read the callback. This tends to happen more on Firefox/Safari - if you are on one of those, try Chrome as a quick test.

Hi @nguyenthieutoan and @kjooleng ! Thanks for your responses.

There is no redirect URI to register in Faire’s developer portal. I’ve seen this suggested elsewhere and I’m not sure where it started, but I’ve confirmed with Faire’s technical support that this is not a thing. The only times redirect URL is used is in the permission URL and the exchange for the token.

When I try making the request again while monitoring the Network tab in Chrome’s Developer Tools I see that the status code is 200. I have no reason to believe that my set up has any errors.

I’ve tried disabling extensions and running incognito on Chrome to no avail. The error still persists - in fact, I haven’t even seen the authorization code passed to the URL yet today.

Can you share the exact redirect URI that n8n shows for the credential and the callback URL you’ve registered in Faire (with any secrets removed)?

Also, does the error happen before you approve access in Faire, or only after Faire redirects back to n8n?

That should help narrow down whether it’s a redirect URI mismatch, an issue during the token exchange, or something in the credential configuration itself. Since you mentioned that you can sometimes see the authorization code in the callback URL, it sounds like the authorization step may be completing and the problem could be happening afterward.

Hi @OMGItsDerek , here’s the redirect URL provided by N8N: https://oauth.n8n.cloud/oauth2/callback

There is no ability to register a callback URL with Faire. I’ve confirmed this with Faire’s technical support. The only times the callback URL is used is in the permission URL and the exchange for the token.

The errors always occur AFTER I approve access in Faire. The authorization window pops up, I check the box to authorize, press submit, and I’m met with the “An error occurred, redirecting back…” message, but nothing happens. I haven’t seen the authorization code in the URL from my attempts in the past 48 hours.

@turunenpayton welcome to the n8n community!
we had an update on 01/06 with a version that can help you
Release notes | n8n Docs

Hi @tamy.santos , thank you for the response. I updated to 2.25.1 and tried again - still nothing. Maybe I’m missing something? I’m not technologically inclined enough to completely understand the changelogs.

If I read the Faire documentation correctly you pass the redirectUrl as a parameter in the Authorization URL. Be sure to pass here the n8n callback url accordingly. Look at the last query parameter, which states redirectUrl=https://example.com

That is what you probably already stated - did you also send the required state parameter? You can add additional parameters in the Auth URI Query Parameters section.

Hi @DavidAtVylos , thanks for your responses. I’ve included the state parameter and followed the OAuth permission URL example exactly. I have not utilized the Auth URI Query Parameters section because I simply included them in the URL. Would I be wrong in assuming this wouldn’t make a difference?

@turunenpayton, always use the stable version, which is currently 2.23.2
in your case, the issue is on the fairy side
if you’re interested, please share the error logs.

Once try that, try to put the base URL https://www.faire.com/oauth2/authorize in the URL section of the HTTP request node, and then in the query paramters section,

Name Value
redirectUrl https://oauth.n8n.cloud/oauth2/callback
state [Your state string]
Try this in a incognito window, and hopefully this helps you.