to_upstream #1

Closed
mountain wants to merge 12 commits from ws:to_upstream into master
6 changed files with 187 additions and 7 deletions
Showing only changes of commit 779d7f910f - Show all commits

View File

@ -3,6 +3,7 @@ package core
import ( import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt"
"log" "log"
"net/http" "net/http"
"net/url" "net/url"
@ -263,6 +264,9 @@ func (mg *Maingate) platform_firebase_getuserinfo(info usertokeninfo) (bool, str
} }
tempEmail := found["firebaseemail"].(string) tempEmail := found["firebaseemail"].(string)
if found["firebaseprovider"].(string) == "guest" {
tempEmail = fmt.Sprintf("%s@guest.flag", info.userid)
}
return true, info.userid, tempEmail return true, info.userid, tempEmail

View File

@ -679,9 +679,6 @@ func (sh *serviceDescription) authorize(w http.ResponseWriter, r *http.Request)
} }
if authtype != newType || uid != newId { if authtype != newType || uid != newId {
if authtype == "firebase" && newType == "guest" {
email = fmt.Sprintf("%s@guest.flag", uid)
}
authtype = newType authtype = newType
uid = newId uid = newId
} }