diff --git a/go/twitterchiver/viewer/viewer.go b/go/twitterchiver/viewer/viewer.go index 7c85e3cb4c..8a596e0fcc 100644 --- a/go/twitterchiver/viewer/viewer.go +++ b/go/twitterchiver/viewer/viewer.go @@ -154,8 +154,10 @@ func main() { log.Fatalf("pomerium.New: %v", err) } authR.Use(pomerium.AddIdentityToRequest(v)) + log.Println("configured pomerium middleware") + } else { + authR = r } - authR = r userFromContext := func(ctx context.Context) (string, error) { if *localDisableAuth != "" { @@ -165,7 +167,7 @@ func main() { if err != nil { return "", err } - return identity.User, nil + return identity.Email, nil } writeError := func(rw http.ResponseWriter, status int, wrap string, err error) {