1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-28 23:09:06 +09:00
This commit is contained in:
syuilo 2018-04-08 04:44:59 +09:00
parent cebea4e94c
commit 7f448221ce
3 changed files with 8 additions and 3 deletions

View File

@ -203,7 +203,7 @@
"vue-cropperjs": "2.2.0",
"vue-js-modal": "1.3.12",
"vue-json-tree-view": "2.1.3",
"vue-loader": "15.0.0-rc.1",
"vue-loader": "14.2.2",
"vue-router": "3.0.1",
"vue-template-compiler": "2.5.16",
"vuedraggable": "2.16.0",

View File

@ -220,7 +220,7 @@ export default class MiOS extends EventEmitter {
public signout() {
localStorage.removeItem('me');
document.cookie = `i=; domain=.${hostname}; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
document.cookie = `i=; domain=${hostname}; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
location.href = '/';
}
@ -325,6 +325,11 @@ export default class MiOS extends EventEmitter {
// キャッシュがあったとき
if (cachedMe) {
if (cachedMe.token == null) {
this.signout();
return;
}
// とりあえずキャッシュされたデータでお茶を濁して(?)おいて、
fetched(cachedMe);

View File

@ -49,7 +49,7 @@ export default async (req: express.Request, res: express.Response) => {
}
// Compare password
const same = await bcrypt.compare(password, password);
const same = await bcrypt.compare(password, user.password);
if (same) {
if (user.twoFactorEnabled) {