💾 save new auth data to localstorage
ref#29
This commit is contained in:
		| @@ -1,5 +1,6 @@ | ||||
| import { writable } from 'svelte/store'; | ||||
| import { OpenAPI, AuthService } from '@odit/lfk-client-js'; | ||||
| import localForage from "localforage"; | ||||
|  | ||||
| export let users = writable([]); | ||||
| export let tracks = writable([]); | ||||
| @@ -27,7 +28,7 @@ const store = () => { | ||||
| 				console.log('got new auth'); | ||||
| 				console.log(auth); | ||||
| 				OpenAPI.TOKEN = auth.access_token; | ||||
| 				// TODO: update localstorage | ||||
| 				localForage.setItem('logindata', auth); | ||||
| 			}); | ||||
| 		}, | ||||
| 		login(auth, jwtinfo) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user