guest 계정 지원

This commit is contained in:
2023-08-09 17:39:16 +09:00
parent 8126406e5f
commit c7f073c779

View File

@ -576,6 +576,7 @@ func (sh *serviceDescription) authorize(w http.ResponseWriter, r *http.Request)
var email string var email string
if !*noauth { if !*noauth {
if len(authtype) > 0 {
//email, err := sh.readProfile(authtype, uid, accesstoken) //email, err := sh.readProfile(authtype, uid, accesstoken)
bfinfo, err := sh.getUserBrowserInfo(r) bfinfo, err := sh.getUserBrowserInfo(r)
if err != nil { if err != nil {
@ -602,6 +603,9 @@ func (sh *serviceDescription) authorize(w http.ResponseWriter, r *http.Request)
uid = newId uid = newId
logger.Println("auth success ( redirect ) :", authtype, uid, email, session) logger.Println("auth success ( redirect ) :", authtype, uid, email, session)
} }
} else {
email = fmt.Sprintf("%s@guest.flag", uid)
}
} else { } else {
email = fmt.Sprintf("%s@noauth.flag", uid) email = fmt.Sprintf("%s@noauth.flag", uid)
} }