fix: allow phone number as basic login
This commit is contained in:
@@ -23,9 +23,10 @@ const (
|
||||
defaultMinPasswordLength = 3
|
||||
)
|
||||
|
||||
// Token suitable as a login: starts and ends with a Unicode letter (class L) or number (class N),
|
||||
// contains Unicode letters, numbers, dot and underscore.
|
||||
var loginPattern = regexp.MustCompile(`^[\pL\pN][_.\pL\pN]*[\pL\pN]+$`)
|
||||
// Token suitable as a login: either an E.164 phone number or a name which starts
|
||||
// and ends with a Unicode letter (class L) or number (class N), and contains
|
||||
// Unicode letters, numbers, dot and underscore.
|
||||
var loginPattern = regexp.MustCompile(`^(\+[\pN]+|[\pL\pN][_.\pL\pN]*[\pL\pN]+)$`)
|
||||
|
||||
// authenticator is the type to map authentication methods to.
|
||||
type authenticator struct {
|
||||
|
||||
Reference in New Issue
Block a user