silent_coder
silent_coder

Reputation: 6502

passport difference between LocalStrategy and ClientPasswordStrategy

I'm a little bit confused with this strategies and do not clearly understand difference between them, and which of them I need to use in my application? (Or even need it in general), because I only need to exchange user credential to token, and then plann to use bearer strategy

Upvotes: 1

Views: 362

Answers (1)

José F. Romaniello
José F. Romaniello

Reputation: 14156

LocalStrategy is used to authenticate with Basic Authentication which means the user's username and password is sent base64 encoded in the Authentication header.

ClientPasswordStrategy is something very different and unless you are building your own OAuth provider you won't need it. It authenticates the id and secret of a client in the request body. Please note that the id and secret in this case are the application's credentials, not the user credentials.

Upvotes: 3

Related Questions