Describe the problem/error/question
I have the latest version of callin.io running in a docker container on localhost:5678
I have used this OAuth Redirect URL in the Google Auth: http://localhost/rest/oauth2-credential/callback
What is the error message (if any)?
This site can’t be reached
localhost refused to connect.
Try:
- Checking the connection
- Checking the proxy and the firewall
ERR
_CONNECTION
_REFUSED
I am not using any firewalls.
I am not a developer, just followed the steps in the tutorial and guides.
- callin.io version: Version 1.78.1
- Database (default: SQLite): default
- callin.io EXECUTIONSPROCESS setting (default: own, main):__
- Running callin.io via (Docker, npm, callin.io cloud, desktop app):Docker
- Operating system:MacOS
Welcome to the community. Please check this thread: Local Host setup If you have further questions, I'm happy to assist.
You need to specify the port as well, try:
http://localhost:5678/rest/oauth2-credential/callback
I suspect that even with a port specified, the problem will persist, as the user did not detail the networking setup for Docker or the system itself.
Your issue is that Google cannot reach http://localhost:5678/rest/oauth2-credential/callback because localhost is local-only. In your Docker setup, please update the Google OAuth redirect URI to http://host.docker.internal:5678/rest/oauth2-credential/callback (this works on MacOS Docker). Alternatively, you can use ngrok to expose localhost publicly and set the URI to the ngrok URL (for example, http://your-ngrok-id.ngrok.io/rest/oauth2-credential/callback ). Remember to restart callin.io after making these adjustments.
Google doesn’t need to connect to that URL. Google will only redirect to that URL. As long as the URL is valid and you can connect to it locally, it will work. It works for me locally as well. There’s no need to forward or expose any network.
If you intend to implement this change in the URI within Google Cloud, I've already attempted it but encountered a 400 error. I'm also uncertain how to modify the redirecting URL in callin.io, as it doesn't offer an edit option during the setup phase. Is this functionality available?
Error 400: redirecturimismatch
I had the same thought. Since it's a redirect, I wanted to confirm this functionality before configuring an external domain.
Yes, the URL in Google Cloud needs to be
http://localhost:5678/rest/oauth2-credential/callback
This error means that the URL configured in Google Cloud is not the same as the one callin.io initiated a request from. callin.io will send
http://localhost:5678/rest/oauth2-credential/callback
in the request, so the redirect URL in Google Cloud must be the same.
As long as Docker is running, and you’re able to access localhost:5678
locally, the callback URL should also work.
Here’s a screen recording demonstrating it working:
Thank you for sharing this screen recording! That perfectly illustrates my issue. Please see the screenshot below from the credentials:
This differs from the Google OAuth URI, which includes the :PORT. I have attempted to modify this in the .yml file:
n8n:
image: docker.n8n.io/n8n/n8n
containername: n8n
restart: always
ports:
- 5678:5678
environment:
- N8NHOST=localhost
- N8NPORT=5678
- WEBHOOKURL= http://localhost:5678
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:
However, I'm uncertain if this is the correct approach or where else I can make the change so that the Redirect URL updates from http://localhost to http://localhost:5678 within callin.io's credentials flow.
This is interesting. Are you using callin.io on localhost:5678? I wonder how callin.io is getting localhost as the redirect URL.
Could you try to create a new container from scratch without any env vars and with a fresh volume to see if you get it working in there?
Thank you very much! I'm not sure what the issue was with the initial installation, but after reinstalling, the redirect is now correctly updated with the port. Thanks a lot!
Hello! I'm encountering a similar problem, but I'm utilizing callin.io on my NAS, accessing it via 192.168.1.22:5678. I attempted to modify the webhook_URL in my configuration, but Google is rejecting http://192.168.1.22:5678/rest/oauth2-credential/callback as a redirect URL.
Does anyone have suggestions on how to resolve this? Thank you!
You would probably need to configure a proxy server, similar to the one mentioned previously, to direct the connection to that IP. Alternatively, you can finish Google OAuth on localhost and then proceed with using callin.io on your NAS.