Add provider_id to cookie data
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 != "" {
|
||||
|
||||
Reference in New Issue
Block a user