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

Problem with X OAuth API Callback #12368

Open
mateinovac opened this issue Dec 25, 2024 · 2 comments
Open

Problem with X OAuth API Callback #12368

mateinovac opened this issue Dec 25, 2024 · 2 comments
Labels
in linear Issue or PR has been created in Linear for internal review

Comments

@mateinovac
Copy link

mateinovac commented Dec 25, 2024

Bug Description

The latest n8n self-hosted version has an error with the X OAuth API callback, it returns a 401 code even though the app is set up correctly.

Screenshot 2024-12-25 113108

To Reproduce

Steps:

  1. Create an X app from https://developer.x.com/en
  2. Set up the callback URL for the X OAuth App - https://{domain}/rest/oauth1-credential/callback
  3. Get the API Key and the API Secret and create a credential on n8n
  4. Authorize the app and connect with your X account
  5. You should get this error (Code 401) - I've only tried this on the self-hosted version, so I don't know if this also occurs on the cloud version.

Details for this to work:

I use the latest n8n version
I use the self-hosted version

Expected behavior

You'll get an 401 code error - it's an problem from the server it doesn't handles the callback correctly

Operating System

docker (self-hosted)

n8n Version

1.72.1

Node.js Version

20.18.0

Database

SQLite (default)

Execution mode

main (default)

@Joffcom
Copy link
Member

Joffcom commented Dec 25, 2024

Hey @mateinovac,

We have created an internal ticket to look into this which we will be tracking as "N8N-8009"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Dec 25, 2024
@muditjuneja
Copy link

muditjuneja commented Dec 25, 2024

I can confirm that I am getting the same error. I believe the issue is with the redirect url that the tab/popup opens with. In my case, it starts with http://localhost:5678/rest/oauth2-credential/callback which doesn't make sense as I am behind a reverse proxy. Is there a env variable that changes this behavior that i am missing out?

Exact error -
Screenshot 2024-12-26 050014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review
Projects
None yet
Development

No branches or pull requests

3 participants