How to handle Client Credential Grant - loctx21/oauth2orize GitHub Wiki
+---------+ +---------------+
| | | |
| |>--(A)- Client Authentication --->| Authorization |
| Client | | Server |
| |<--(B)---- Access Token ---------<| |
| | | |
+---------+ +---------------+
There is no Authorization Request in this flow. The authorization server will do the authentication instead.
This way, the client will make a single POST request to the token endpoint with client_secret, client_id int its body x-www-form-urlencoded params.
The function, attribute we need to register are:
oauth2orize.exchange.clientCredentialsinserver.exchangeto handle token generation and savingoauth2-client-passwordinpassport.authenticateto let passport use this specific strategy to authenticate request- callback function to verify client_id, client_secret in
passport.usefunction