noauth대신 authtype 파라미터 사용
This commit is contained in:
@ -36,7 +36,7 @@ import (
|
||||
|
||||
var devflag = flagx.Bool("dev", false, "")
|
||||
var noauth = flagx.Bool("noauth", false, "")
|
||||
var authtype = flagx.String("auth", "", "yes|no|both")
|
||||
var authtype = flagx.String("auth", "on", "on|off|both")
|
||||
|
||||
var (
|
||||
CollectionLink = gocommon.CollectionName("link")
|
||||
@ -192,11 +192,11 @@ func New(ctx context.Context) (*Maingate, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if *noauth && len(*authtype) == 0 {
|
||||
*authtype = "no"
|
||||
if len(*authtype) == 0 {
|
||||
*authtype = "on"
|
||||
}
|
||||
|
||||
if *authtype == "yes" || *authtype == "both" {
|
||||
if !*noauth && (*authtype == "on" || *authtype == "both") {
|
||||
if len(config.FirebaseAdminSDKCredentialFile) > 0 {
|
||||
opt := option.WithCredentialsFile(config.FirebaseAdminSDKCredentialFile)
|
||||
firebaseApp, err := firebase.NewApp(context.Background(), nil, opt)
|
||||
|
||||
Reference in New Issue
Block a user