diff --git a/core/platformfirebaseauth.go b/core/platformfirebaseauth.go index 5741818..e97f63d 100644 --- a/core/platformfirebaseauth.go +++ b/core/platformfirebaseauth.go @@ -3,6 +3,7 @@ package core import ( "encoding/json" "errors" + "fmt" "log" "net/http" "net/url" @@ -263,6 +264,9 @@ func (mg *Maingate) platform_firebase_getuserinfo(info usertokeninfo) (bool, str } tempEmail := found["firebaseemail"].(string) + if found["firebaseprovider"].(string) == "guest" { + tempEmail = fmt.Sprintf("%s@guest.flag", info.userid) + } return true, info.userid, tempEmail diff --git a/core/service.go b/core/service.go index 0fca7d3..dc123dc 100644 --- a/core/service.go +++ b/core/service.go @@ -679,9 +679,6 @@ func (sh *serviceDescription) authorize(w http.ResponseWriter, r *http.Request) } if authtype != newType || uid != newId { - if authtype == "firebase" && newType == "guest" { - email = fmt.Sprintf("%s@guest.flag", uid) - } authtype = newType uid = newId }