@1auth/account-username 0.0.0-alpha.8 → 0.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +7 -3
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -5,17 +5,21 @@ import {
|
|
|
5
5
|
|
|
6
6
|
import { createDigest } from '@1auth/crypto'
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// Only allow characters that are safe to encode
|
|
9
|
+
// . not allowed because it can be used to declare and extension
|
|
10
|
+
export const regexp = /^[a-z0-9_-]*$/
|
|
9
11
|
export const jsonSchema = {
|
|
10
12
|
type: 'string',
|
|
11
|
-
pattern: '^[a-z0-
|
|
13
|
+
pattern: '^[a-z0-9_-]*$',
|
|
12
14
|
minLength: 1,
|
|
13
15
|
maxLength: 32
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
const options = {
|
|
17
19
|
id: 'username',
|
|
18
|
-
blacklist: [
|
|
20
|
+
blacklist: []
|
|
21
|
+
//minLength: 1,
|
|
22
|
+
//maxLength: 32
|
|
19
23
|
}
|
|
20
24
|
export default (params) => {
|
|
21
25
|
Object.assign(options, accountOptions(), params)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1auth/account-username",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -50,6 +50,6 @@
|
|
|
50
50
|
"homepage": "https://github.com/willfarrell/1auth",
|
|
51
51
|
"gitHead": "d21e1013f55ed05af4daf980bc4dfdfd52538792",
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@1auth/account": "0.0.0-alpha.
|
|
53
|
+
"@1auth/account": "0.0.0-alpha.9"
|
|
54
54
|
}
|
|
55
55
|
}
|