YunoHost-Apps / n8n_ynh

n8n package for YunoHost
https://n8n.io/
GNU General Public License v3.0
14 stars 19 forks source link

OAuth Redirect Urls point to localhost and port instead of domain #10

Closed stvn1337 closed 2 years ago

stvn1337 commented 2 years ago

Describe the bug

Can't set the WEBHOOK_URL and it defaults to localhost which causes OAuth redirect urls to not work. I have tried setting the Environement variables on the server hosting Yunohost as well as defining the variables in the settings file.

Context

Steps to reproduce

Expected behavior

brimwats1 commented 2 years ago

seconding this as well

brimwats1 commented 2 years ago

seems it can be fixed with .env variables. not sure where to find or add them on yunohost yet https://docs.n8n.io/reference/environment-variables.html

tituspijean commented 2 years ago

Can you confirm it is fixed if you add, for example N8N_HOST=your.domain.tld in /var/www/n8n/.env? Other variables may be needed, I do not know n8n enough. (you will need to restart n8n's service afterwards).

brimwats1 commented 2 years ago

yes, i just figured it out the same way as @tituspijean except I added WEBHOOK_URL=https://domain.tld/n8n/ to the env file. Is N8N_HOST better you think @tituspijean ?

this generates a Callback URL like https://domail.tld/n8n/rest/oauth2-credential/callback

tituspijean commented 2 years ago

Based off what I have just read here, I think your option is more suitable in case of reverse proxifying like we do with NGINX.

brimwats1 commented 2 years ago

I think this can be closed

fflorent commented 2 years ago

Indeed. Thanks for your feedback @brimwats and thanks @tituspijean for your fix! Florent