casdoor / casdoor-go-sdk

Go client SDK for Casdoor
https://github.com/casdoor/casdoor
Apache License 2.0
88 stars 74 forks source link

sdk client.RefreshOAuthToken, without set scope #116

Closed Y-Matin closed 1 month ago

Y-Matin commented 5 months ago

first : get token by code and state , and set scope:profile

when refresh token by client.RefreshOAuthToken, get new accessToken without scope . so I use new accessToken to get userinfo (/api/userinfo), get response doesn't have user's permissions.

but the resultful api need scope parameter image

casbin-bot commented 5 months ago

@tangyang9464 @JalinWang @imp2002

Y-Matin commented 5 months ago

Can you tell me first if this is a problem or if my usage is incorrect ? Thanks

CRSylar commented 4 months ago

i've actually the same problem, when calling client.RefreshOauthToken with the refresh token value i receive an error stating that the token is invalid

hsluoyz commented 4 months ago

@Y-Matin @CRSylar can you make a PR?

hsluoyz commented 1 month ago

Closed as stale