You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some users mentioned they encounter with the error [E] [account.go:97] json: cannot unmarshal object into Go value of type []controllers.userEmailFromGithub
This because the Casbin-dashboard used an access token (with the User-Agent Go-http-client/1.1) as part of a query parameter to access an endpoint through the GitHub API: https://api.github.com/user/emailshttps://api.github.com/user and using the access_token query parameter is deprecated.
To fix this bug, the GitHub Team recommended to use the Authorization HTTP header instead.
The text was updated successfully, but these errors were encountered:
@hsluoyz I had made the pr #136 to fix this issue.
As the Github team mentioned, I use the Authorization HTTP header request1, _ := http.NewRequest("GET", "https://api.github.com/user/emails", nil)request1.Header.Set("Authorization", "token "+token.AccessToken) instead of using access_token as part of a query parameter response, err := http.Get("https://api.github.com/user/emails?access_token=" + token.AccessToken).
Some users mentioned they encounter with the error
[E] [account.go:97] json: cannot unmarshal object into Go value of type []controllers.userEmailFromGithub
This because the Casbin-dashboard used an access token (with the User-Agent Go-http-client/1.1) as part of a query parameter to access an endpoint through the GitHub API: https://api.github.com/user/emails https://api.github.com/user and using the
access_token
query parameter is deprecated.To fix this bug, the GitHub Team recommended to use the Authorization HTTP header instead.
The text was updated successfully, but these errors were encountered: