Fix bugs
This commit is contained in:
		
							parent
							
								
									cebea4e94c
								
							
						
					
					
						commit
						7f448221ce
					
				
					 3 changed files with 8 additions and 3 deletions
				
			
		| 
						 | 
					@ -203,7 +203,7 @@
 | 
				
			||||||
		"vue-cropperjs": "2.2.0",
 | 
							"vue-cropperjs": "2.2.0",
 | 
				
			||||||
		"vue-js-modal": "1.3.12",
 | 
							"vue-js-modal": "1.3.12",
 | 
				
			||||||
		"vue-json-tree-view": "2.1.3",
 | 
							"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-router": "3.0.1",
 | 
				
			||||||
		"vue-template-compiler": "2.5.16",
 | 
							"vue-template-compiler": "2.5.16",
 | 
				
			||||||
		"vuedraggable": "2.16.0",
 | 
							"vuedraggable": "2.16.0",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -220,7 +220,7 @@ export default class MiOS extends EventEmitter {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public signout() {
 | 
						public signout() {
 | 
				
			||||||
		localStorage.removeItem('me');
 | 
							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 = '/';
 | 
							location.href = '/';
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -325,6 +325,11 @@ export default class MiOS extends EventEmitter {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// キャッシュがあったとき
 | 
							// キャッシュがあったとき
 | 
				
			||||||
		if (cachedMe) {
 | 
							if (cachedMe) {
 | 
				
			||||||
 | 
								if (cachedMe.token == null) {
 | 
				
			||||||
 | 
									this.signout();
 | 
				
			||||||
 | 
									return;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			// とりあえずキャッシュされたデータでお茶を濁して(?)おいて、
 | 
								// とりあえずキャッシュされたデータでお茶を濁して(?)おいて、
 | 
				
			||||||
			fetched(cachedMe);
 | 
								fetched(cachedMe);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -49,7 +49,7 @@ export default async (req: express.Request, res: express.Response) => {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Compare password
 | 
						// Compare password
 | 
				
			||||||
	const same = await bcrypt.compare(password, password);
 | 
						const same = await bcrypt.compare(password, user.password);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (same) {
 | 
						if (same) {
 | 
				
			||||||
		if (user.twoFactorEnabled) {
 | 
							if (user.twoFactorEnabled) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue