ging / fiware-idm

OAuth 2.0-based authentication of users and devices, user profile management, Single Sign-On (SSO) and Identity Federation across multiple administration domains.
https://keyrock-fiware.github.io
MIT License
36 stars 80 forks source link

Can not get oauth2 token #182

Open abrahamSecmotic opened 3 years ago

abrahamSecmotic commented 3 years ago

Hi,

In version 7.9.0 of fiware-idm, when I try get token of user, with this request:

curl --location --request POST 'localhost:3000/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'authorization: Basic <SecretEncode>' \
--data-urlencode 'username=admin@example.com' \
--data-urlencode 'password=1234' \
--data-urlencode 'grant_type=password'

I receive this response: Error: 503 "Cannot read property 'scope' of undefined"

I was researching about that and the problem is package npm oauth2-server, in version 4.2 this check data.scope, but data is undefined (node_modules/oauth2-server/lib/handlers/token-handler.js:102:15)

Are there a solution?

floufen commented 3 years ago

I just upgraded from 7.8.2 to 7.9.0 and I got the same error Cannot read property 'scope' of undefined. So i downgraded to 7.8.2.

I am looking for a solution too ?

Jorge-Eduardo-Rivadeneira commented 3 years ago

Hello, I've got the same error, apart from downgrading is there any other solution?