dgrubelic / vue-authenticate

Simple Vue.js authentication library
1.43k stars 251 forks source link

Grant Type = Password #51

Open seifsay3d-zz opened 7 years ago

seifsay3d-zz commented 7 years ago

I'm trying to use the Register/Login features to authenticate my client to my Server but I can't seem to be able to set grant type to password and Ideas where do I set it up.

dgrubelic commented 7 years ago

Technicaly, you don't have to setup grapt_type = password in order to user login/register features. I'll see to add propper configuration when using those methods.

niutech commented 6 years ago

Could you provide an example authorization code using grant_type=password flow? Especially for Spring Boot OAuth2 Authorization Server. Thanks a lot!

ghost commented 5 years ago

I'm also looking for this. I have tried some different ways already, with no luck:

// first try
const vueAuth = new VueAuthenticate(Vue.prototype.$http, {
  baseUrl: 'http://localhost:9000',
  loginUrl: '/oauth/token',
  grantType: 'password',

// second try
const vueAuth = new VueAuthenticate(Vue.prototype.$http, {
  baseUrl: 'http://localhost:9000',
  loginUrl: '/oauth/token',
  defaultUrlParams: ['grant_type'],
  grantType: 'password',

// last try
const vueAuth = new VueAuthenticate(Vue.prototype.$http, {
  baseUrl: 'http://localhost:9000',
  loginUrl: '/oauth/token?grant_type=password'