OAuth Redirect URL is localhost:5678, still not resoved with many tries

I’m running n8n in my own server by npm, not using docker. The google OAuth Redirect URL is localhost:5678 and unable to modify.
So after successfully login to google, It tries to redirect to localhost, which is unreachable.

I have tried set environment:
export WEBHOOK_URL=http://your_server_ip_or_domain:5678/

Add configs in config.json:
“scripts”: {
“start”: “WEBHOOK_URL=https://your_server_ip_or_domain:5678/ n8n start”
}
but neither of them works
Do I need to set something in nginx?

Hi, As far as i know you specifically need to allow localhost as a redirect URL in google oauth and/or you need a tunnel service like ngrok. similar questions can be found on SO: Testing Google OAuth 2.0 with localhost? - Stack Overflow

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.