simov / grant

OAuth Proxy
MIT License
4.08k stars 257 forks source link

twitter user id null #253

Closed eroo36 closed 3 years ago

eroo36 commented 3 years ago

Hello again, when getting the profile for twitter, I'm getting this error:

TypeError: Cannot read property 'user_id' of undefined
    at Object.twitter (\node_modules\grant\lib\profile.js:101:53)

twitter: ({output}) => ({qs: {user_id: output.raw.user_id}}),

and this is my config :

"twitter": {
        "key": "",
        "secret": "",
        "callback": "/callback",
        "scope": ["read", "write"],
        "response": ["tokens", "profile"]
    }
eroo36 commented 3 years ago

Figured it out. Need to add "raw" to the response