apache / incubator-answer-plugins

The Apache Answer plugins repository.
https://answer.apache.org/plugins
Apache License 2.0
62 stars 31 forks source link

The third-party platform does not provide a unique UserID - Google Connector Bug. #118

Closed eurooooo closed 1 month ago

eurooooo commented 1 month ago

I tried connect to google but face this issue:

HTTP-Error-500-Apache-Answer

Then I printed out fields in userInfo in function ConnectorReceiver in google.go. It turns out that google doesn't return ID field as unique identifier for users, instead it uses Sub field. image

So I changed ExternalID: respGoogleAuthUserInfo.ID to ExternalID: respGoogleAuthUserInfo.Sub and connected to google account successfully! after

LinkinStars commented 1 month ago

Fix in #119