@1auth/authn 0.0.0-alpha.13 → 0.0.0-alpha.15
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 +9 -9
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -100,17 +100,17 @@ export const authenticate = async (username, secret, parentOptions) => {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
// delete OTP to prevent re-use
|
|
104
103
|
if (parentOptions.secret.otp) {
|
|
104
|
+
// delete OTP to prevent re-use
|
|
105
105
|
await options.store.remove(options.table, { id, sub })
|
|
106
|
-
} else {
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
106
|
+
} else if (valid && parentOptions.id !== 'WebAuthn') {
|
|
107
|
+
// WebAuthn has to update, skip here
|
|
108
|
+
const now = nowInSeconds()
|
|
109
|
+
await options.store.update(
|
|
110
|
+
options.table,
|
|
111
|
+
{ id, sub },
|
|
112
|
+
{ update: now, lastused: now }
|
|
113
|
+
)
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
await timeout
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1auth/authn",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"url": "https://github.com/willfarrell/1auth/issues"
|
|
49
49
|
},
|
|
50
50
|
"homepage": "https://github.com/willfarrell/1auth",
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "0371321ab44ff76766e688c4cd1b2f41811c2af6",
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@1auth/crypto": "0.0.0-alpha.
|
|
53
|
+
"@1auth/crypto": "0.0.0-alpha.15"
|
|
54
54
|
}
|
|
55
55
|
}
|