Index: impl/memory/user.go |
diff --git a/impl/memory/user.go b/impl/memory/user.go |
index 1813d41f9b465c197219ecf97ff09daa90463e92..50f828f94daf9bf11d875cebcb714b47ac46e25c 100644 |
--- a/impl/memory/user.go |
+++ b/impl/memory/user.go |
@@ -8,6 +8,7 @@ import ( |
"crypto/sha256" |
"encoding/binary" |
"fmt" |
+ "net/mail" |
"net/url" |
"strings" |
"sync" |
@@ -93,6 +94,12 @@ func (u *userImpl) SetUser(user *user.User) { |
} |
func (u *userImpl) Login(email, clientID string, admin bool) { |
+ adr, err := mail.ParseAddress(email) |
+ if err != nil { |
+ panic(err) |
+ } |
+ email = adr.Address |
+ |
parts := strings.Split(email, "@") |
if len(parts) != 2 { |
panic(fmt.Errorf("%q doesn't seem to be a valid email", email)) |