I am using a self-hosted version of n8n with Docker. I am having issues with the Google OAuth2 API login process.
I followed all steps documented in Google OAuth2 single service | n8n Docs and everything seems to be OK. Already reviewed the config a few times.
OAuth2 Callback URL, although blurred, is something like https://actions.ourcompany.com/rest/…
When I try to test my credentials in n8n by clicking in Sign in with Google, first Google window is prompted asking me to select account to be used, then once account is selected it asks me to actually allow the application some Google privileges (in my case, Google Calendar ones). Up to here all good.
Then, when I click on ‘Allow’ to complete the login, it just redirects me to my homepage (https://ourcompany.com which happens to be on the same public domain as my n8n) and login is not completed, in n8n it does not show as logged in.
Trying to debug it from the browser, it shows the last request was done to the OAuth2 Callback URL and it got a 302 Found response, not sure if that is correct or not…
Any way I can try to debug this or any idea on how to deal with this?
- n8n version: 0.126.1
- Database (default: SQLite): SQLite
- n8n EXECUTIONS_PROCESS setting (default: own, main): not sure…
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Ubuntu
It looks like your topic is missing some important information. Could you provide the following if applicable.
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system:
Can you double check the version of n8n?
0.126.1 is very old and it is likely that any issue you are seeing has been resolved.
I suspect the issue itself though is the redirect URI may not be set correctly on the Google side so I would double check that again after you have upgraded to see if that helps.
Thanks for your quick reply @Jon .
Just double checked, 0.126.1 is the correct version. We are just using a couple automations and working good so far, so didn’t had the need of upgrading it…at least until now.
As regards to the redirect URI, I also checked and seems configured OK, it matches the same one that is provided in n8n interface.
Unless you think there is something else that should be checked, I’ll give it a try to a possible update and update after re-testing.
That URL looks like it could be correct, The 302 could be that you have something else in the way trying to do a redirect so it is very possible that an upgrade may not help as the issue could be outside of n8n.
I would still recommend checking the release notes for breaking changes and the migration guide to v1 then doing an upgrade as if it is a bug with that release it would have been fixed by now.
Breaking Changes: n8n/packages/cli/BREAKING-CHANGES.md at master · n8n-io/n8n · GitHub
v1 Migration Guide: n8n v1.0 migration guide | n8n Docs
Release Notes: Release notes | n8n Docs
Hey @Jon ,
Just letting you know, issue was fixed. It had to do with the proxy configuration in our server, it was forwarding the requests to our homepage since no config was done in the proxy to address requests to the Callback URL, so it was doing the redirection as a catch-error kind of thing.
Thanks for your support!
Thanks for the update that is good to know.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.