manjeshpv / node-oauth2-server-implementation

Using oauth2-server: 3.0.0-b2 & Supports MongoDB, MySQL, PostgreSQL, MSSQL & SQLite
216 stars 103 forks source link

Password Grant - grant_type => password #17

Open rnl2004 opened 7 years ago

rnl2004 commented 7 years ago

Hi,

I noticed that invoking http://localhost:3000/oauth/token (POST) need to have Authorization: Basic encoded(client_id + ':' + client_secret) as part of the header. My concern now what if i only need to have an access token doesn't care the client_id and client_key is it possible to achieved in this case?

Sample: { method: 'POST', uri: 'http://localhost:3000/oauth/token', form: { grant_type: 'password', username: 'testuser', password: 'testpassword', scope: 'profile' }, headers: { 'Content-Type': 'application/x-www-form-urlencoded', Authorization: 'Basic testuser:testpassword' } }

manjeshpv commented 7 years ago

you can store client details in server. and from client send simple POST request for login and server will add client details