summaryrefslogtreecommitdiff
path: root/src/api/authenticate.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-01-06 11:50:46 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-01-06 11:50:46 +0900
commit94582453820655d11cb6dff8ad62148742591103 (patch)
tree8f5daf00c67e0a536afce99c6dd248a65e741706 /src/api/authenticate.ts
parentRefactor: Extract isNativeToken method (diff)
downloadsharkey-94582453820655d11cb6dff8ad62148742591103.tar.gz
sharkey-94582453820655d11cb6dff8ad62148742591103.tar.bz2
sharkey-94582453820655d11cb6dff8ad62148742591103.zip
[BREAKING CHANGE] Improve security
Diffstat (limited to 'src/api/authenticate.ts')
-rw-r--r--src/api/authenticate.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/authenticate.ts b/src/api/authenticate.ts
index 832517379f..0a888e72d3 100644
--- a/src/api/authenticate.ts
+++ b/src/api/authenticate.ts
@@ -43,7 +43,7 @@ export default (req: express.Request) => new Promise<IAuthContext>(async (resolv
});
} else {
const userkeyDoc = await Userkey.findOne({
- key: token
+ hash: token
});
if (userkeyDoc === null) {