OAuth2 Authentication - How to customize the flow>

Hi, I’m working on a custom node and I’m using OAuth2 Authentication.

I have App A, this is where the OAuth2 Management lies.
Then in App B, we need to authenticate thru App A then exchange App A’s access token into App B’s own access token (different from App A).

My problem is that, in my custom node, how do I authenticate thru App A then exchange that token into App B’s token?

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 @thynameisjayvee

Welcome to the community :raised_hands:

Assuming it is still standard oauth2 it is just Auth and token refreshing that happens on app A all you need to do is tell App B to use the oauth credential from app A. You won’t need to manually send the token as we handle it internally.

If however things are a bit funky you would need to add a preAuthenticate method to your credential or in a generic functions to handle the exchange.

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