Custom Node: OAuth2 implementation

Describe the problem/error/question

I am building a custom node for a social media scheduling tool, I have a problem with the authorization part, my clients need to be authorized n8n to access certain data, I tried the oauth2 flow but it seems this is not what I am looking for, my users don’t need to enter the client_id or client_secret, I want them to be redirected to /authorize, then /exchange for getting the access token.

How do we implement that flow on n8n?

If anyone is familiar with make.com, I already built an integration on their platform, not sure if possible to implement the same oauth2 authorization flow on n8n.

Information on your n8n setup

  • n8n version: 1.31.2
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: windows

Hey @oussamaKreatinc,

If you are making the credential for your node you can hide the client_id and client_secret fields then have your users authenticate from inside of n8n. If you are trying to handle the auth outside of n8n and pass it in you may need to use something like Nango to help with that.