Commit 60fd8ee9 by Marcus Efraimsson

fix id returned from google is a string

parent 15226141
...@@ -32,7 +32,7 @@ func (s *SocialGoogle) IsSignupAllowed() bool { ...@@ -32,7 +32,7 @@ func (s *SocialGoogle) IsSignupAllowed() bool {
func (s *SocialGoogle) UserInfo(client *http.Client, token *oauth2.Token) (*BasicUserInfo, error) { func (s *SocialGoogle) UserInfo(client *http.Client, token *oauth2.Token) (*BasicUserInfo, error) {
var data struct { var data struct {
Id int `json:"id"` Id string `json:"id"`
Name string `json:"name"` Name string `json:"name"`
Email string `json:"email"` Email string `json:"email"`
} }
...@@ -48,7 +48,7 @@ func (s *SocialGoogle) UserInfo(client *http.Client, token *oauth2.Token) (*Basi ...@@ -48,7 +48,7 @@ func (s *SocialGoogle) UserInfo(client *http.Client, token *oauth2.Token) (*Basi
} }
return &BasicUserInfo{ return &BasicUserInfo{
Id: fmt.Sprintf("%d", data.Id), Id: data.Id,
Name: data.Name, Name: data.Name,
Email: data.Email, Email: data.Email,
Login: data.Email, Login: data.Email,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment