Google OAuth problem - Google Calendar

HI. I’m still very new to all this so please bear with me.
General info: My n8n (version 1.103.1) is self hosted (via Docker) on Hostinger VPS. I have access to n8n via my custom domain reverse proxy.
I have added the WEBHOOK parameter to my docker-compose.yml and these as well:
N8N_HOST=yourdomain.com
GENERIC_OAUTH2_REDIRECT_URI=https://yourdomain.com/oauth2/callback
(with my domain name substituted of course)

I am trying to set up a node to create an event in Google Calendar. However, when I try to do the “Sign in with Google”, I get:
Error 400: redirect_uri_mismatch Request details: flowName=GeneralOAuthFlow



Any help/pointers greatly appreciated.
TIA.

Hey @HughPugh hope all is well.

I’ve never heard of this env variable. Where did you read about it?

Hello @jabbson
It was mentioned in an answer to another community post dealing with a very similar issue. I’ve just searched for it again but can’t find it now. Typical. :grinning_face:

Do you get the same error when you do not specify this env var?

Yes. I have been trying to solve this issue for hours. :face_with_raised_eyebrow: I found the mention of the latter two parameters and added them just before I decided that I needed to ask for help.
I’m not completely sure that this issue isn’t caused by something on the Google side but I just can’t see it. “Wood and trees” etc. :grinning_face_with_smiling_eyes:

I mean yeah, the only thing that comes to mind is that if I got an error saying “URI_REDIRECT_MISMATCH”, I would go and double-tripple-quadruple check the redirect URL I specified on the google cloud side and whether it matches to what’s on the Credential setup page.

Thanks for your responses so far. TBH, I’m a bit lost now. When I try to follow the help docs for Google OAuth2, they don’t seem to make sense in relation to what I see on my screen. I’ve never set up a project in the Google environment before so maybe there are additional “background” things I have to do as a first timer. I’ll just have to keep looking. In the meantime, if anyone has any ideas or pointers that may help, I’d very much appreciate it.
TIA.