Hey,
I’d like to write into a MS365 calendar from my locally hosted n8n, which is not reachable from outside our network. For authorization I’d need a callback URI as described here: Microsoft credentials | n8n Docs but I don’t have a public one. So I thought to switch tho the OAuth 2.0 device authorization grant flow, because that works without callback, once the device (my n8n) is authenticated. Is there a way to use that potocol in n8n? Or any other idea to get around having my server facing public to provide a callback?
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:
- n8n version: 1.61.0
I don’t consider the rest important for my question. In case it is, I’ll be happy to get that explained by a human poster.
Hello @Gauner
n8n does not provide that auth type.
You can use a cloud n8n as a second instance with a webhook to call the calendar API
Ok, thanks for confirming what I had already suspected.
Good Idea to have a cloud n8n as a proxy. But somehow that defeats the purpose of not having our data in the cloud (except that calender, but ok, nothing more goes through n8n as well).
Ahh, I think, still this doesn’t work, because I don’t get back the response into my app, which I need (to have the created event’s ID).
if you need a callback - then you need a webhook that is able to listen for events
@Gauner; If you’re looking to integrate local n8n without exposing it to the outside world, I’ve got a couple of solid options for you:
- Ngrok: Great for quick online access for OAuth callbacks during testing and development. Just follow the Ngrok Getting Started Guide.
- Traefik: Ideal for long-term, secure access to local services, especially in production. Visit the Traefik Documentation to get started.
Both options handle OAuth callbacks without leaving your network open. Choose the best one for your setup and get started!
Thank you very much
Traefik (or a reverse proxy) sounds good, but then again, I have a culprit by having another publicly reachable machine connected to our internal network, except our router. Is there any special setup to traefik, which makes it secure? Anything special just for Oauth2?
Otherwise, the more I think about it, the clearer it becomes: I cannot provide a callback url, also not by some proxy which is again a culprit, because it is a bridge to our internal world.
I think, Oauth2 device code flow is right for this kind of use case. Also, because my local app is not supposed to have any user interaction.
Where can I place this Oauth2 flavor as a feature request for n8n?
Totally makes sense to me, because n8n apps are a totally typical use case for device code authentication - no user interaction, just automatisms.
I think, no Apple TV needs to provide a callback URL, these kind of things often works with device code auth, why shouldn’t n8n too?
Ok, I made the OAuth device code Flow by myself. Below is the first part, which ends up in an authorization and a refresh token. Of course, after that, one needs the mechanic to refresh the auth token, like here.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.