What's the best way to implement OAuth 2.0 for multiple platforms in n8n?

I have self hosted n8n in my ubuntu server.

I have a SaaS application which runs on NextJS. I’m trying to implement Google Calendar Login inside my NextJS application.

Here is how I managed to set it up using a workflow.

Is this a good approach or is there any better way to implement faster considering I have more than 20 platforms?

Is there any Login Embed button from credentials which I can copy in my code to handle the entire OAuth and just return me the tokens?

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:

Hey @Ravi_Varma,

Welcome to the community :raised_hands:

n8n handles oauth automatically for users from the UI so there normally isn’t a need to build out a workflow to handle it unless you are using n8n for users outside of your company.

@Jon Thank you for the welcome :grinning:

I’m building these Integrations for users outside my company (i.e my customers).

Also, I’m building custom UI for workflows. I would use n8n as an API to run these workflows.

Hey @Ravi_Varma,

That is perfect, Did you bring this up with our sales team while you were purchasing your embed license as there is a chance they may be aware of other solutions for this.

If you don’t yet have an embed license for what it is you are doing you are required to have one, It may be worth checking our license FAQ here: Sustainable Use License | n8n Docs

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.