Open clearcodecn opened 4 years ago
demo of my config:
Vue.use(VueAuthenticate, {
baseUrl: process.env.BASE_URL || 'http://localhost:8082', // Your API domain
providers: {
gopher1024: {
clientId: 'spa',
name: 'myapp',
url: '/sso/token',
authorizationEndpoint: 'http://localhost:8082/sso/authorize',
redirectUri: 'http://localhost:7001/oauth2',
requiredUrlParams: ['scope'],
defaultUrlParams: ['response_type', 'client_id', 'redirect_uri'],
responseParams: {
grant_type: 'authorization_code',
},
scope: ['all'],
scopeDelimiter: ',',
oauthType: '2.0',
},
}
})
oauth succeed but request token failed with request and response below:
GET http://localhost:8082/sso/token
{"code":"9Z3LNUN4MHOURR_NIRSEWQ","clientId":"spa","redirectUri":"http://localhost:7001/oauth2"}
{"error":"unsupported_grant_type","error_description":"The authorization grant type is not supported by the authorization server"}
I was configed grant_type:authorization_code
in my config but it's no used.
Hah, I just requested this too. Are you trying to authenticate with Bungie? Did you ever figure it out? :)
If you want to use parameters that aren't currently in vue-authentication, use the axios request interceptor as documented in the README.md. It's a big hammer to hit the problem with, but it works :) Good luck!
this is the code in
src/oauth/oauth2.js