Closed eurooooo closed 1 month ago
I tried connect to google but faced this issue:
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.
So I changed ExternalID: respGoogleAuthUserInfo.ID:
to ExternalID: respGoogleAuthUserInfo.Sub:
And I connected to google account successfully.
@eurooooo Thanks for the contribution.
I tried connect to google but faced this issue:
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.
So I changed ExternalID: respGoogleAuthUserInfo.ID:![before](https://github.com/apache/incubator-answer-plugins/assets/88925843/0ec2a218-3c75-4ace-82bb-cf95b1f0dc8a)
to ExternalID: respGoogleAuthUserInfo.Sub:![after](https://github.com/apache/incubator-answer-plugins/assets/88925843/d6b338b0-2aba-465b-94ab-397d41406e10)
And I connected to google account successfully.