Oauth2 Credential with "password" grant type (requires username and password)

I’m aware that the building in Oauth2 crednetial type doesn’t support “password” grant types. I’ve got a flow working using HTTPRequests that does work.

However, I would like to be able to save the access token and refresh token’s in a credential. Is there a good way to do this? I don’t like the idea of saving them in the execution directly.

Is there a better way to handle this?

Debug info

core

  • n8nVersion: 1.97.1
  • platform: docker (cloud)
  • nodeJsVersion: 20.19.2
  • database: sqlite
  • executionMode: regular