Add provider_id to cookie data
This commit is contained in:
@@ -10,6 +10,7 @@ type CookieID struct {
|
|||||||
Id string `json:"id"`
|
Id string `json:"id"`
|
||||||
UserName string `json:"user_name"`
|
UserName string `json:"user_name"`
|
||||||
UserAvatar string `json:"user_avatar"`
|
UserAvatar string `json:"user_avatar"`
|
||||||
|
ProviderId string `json:"provider_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *CookieID) SetCookie(rw http.ResponseWriter, host string) error {
|
func (c *CookieID) SetCookie(rw http.ResponseWriter, host string) error {
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ func LoginCallback(rw http.ResponseWriter, req *http.Request) {
|
|||||||
return
|
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"
|
host := "localhost"
|
||||||
if req.Host != "" {
|
if req.Host != "" {
|
||||||
|
|||||||
Reference in New Issue
Block a user