athombv / node-homey-oauth2app

This module does the heavy lifting for a Homey App that talks to any OAuth2 Web API.
https://athombv.github.io/node-homey-oauth2app/
5 stars 5 forks source link

Question: oAuth with credentials #63

Closed edwinvdpol closed 2 years ago

edwinvdpol commented 2 years ago

Hi there,

What is the easiest / preferred way to implement the oAuth2 module with "client_credentials"?

I see in the code that it supports for example getTokenByCredentials, but when and how are these called? Is there a possibility to use this module with for instance the credentials login pair view, and that this module will take care of the rest?

All it has to do, is fetching the access token with these credentials. The rest can be the same as the default implementation (auth redirect), with the exception that CLIENT_ID and CLIENT_SECRET aren't needed.

-- Edwin