This commit is contained in:
Umputun
2018-02-14 02:33:30 -06:00
parent b41145d670
commit 7ca8e8e5e8
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -167,7 +167,7 @@ func (p Provider) AuthHandler(w http.ResponseWriter, r *http.Request) {
return
}
log.Printf("[DEBUG] %+v", jData)
log.Printf("[DEBUG] user info %+v", session.Values["uinfo"])
// redirect to back url if presented in login query params
if fromURL, ok := session.Values["from"]; ok {
+1 -1
View File
@@ -80,10 +80,10 @@ func NewFacebook(p Params) Provider {
}
userInfo.ID = "facebook_" + userInfo.ID
log.Printf("%T", data["picture"])
// picture under picture[data[url]]
if p, ok := data["picture"]; ok {
if d, ok := p.(map[string]interface{}); ok {
log.Printf("%+v", d)
if picURL, ok := d["url"]; ok {
userInfo.Picture = picURL.(string)
}