Skip to content

Commit

Permalink
Add provider_id to cookie data
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosnils committed Jun 22, 2019
1 parent cf25f75 commit 92299bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions handlers/cookie_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type CookieID struct {
Id string `json:"id"`
UserName string `json:"user_name"`
UserAvatar string `json:"user_avatar"`
ProviderId string `json:"provider_id"`
}

func (c *CookieID) SetCookie(rw http.ResponseWriter, host string) error {
Expand Down
2 changes: 1 addition & 1 deletion handlers/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func LoginCallback(rw http.ResponseWriter, req *http.Request) {
return
}

cookieData := CookieID{Id: user.Id, UserName: user.Name, UserAvatar: user.Avatar}
cookieData := CookieID{Id: user.Id, UserName: user.Name, UserAvatar: user.Avatar, ProviderId: user.ProviderUserId}

host := "localhost"
if req.Host != "" {
Expand Down

0 comments on commit 92299bd

Please sign in to comment.