Client UUID added to JWT

This commit is contained in:
Magnus Åhall 2025-01-12 17:35:29 +01:00
parent dfd6260a7a
commit dc010df448
6 changed files with 65 additions and 38 deletions

View file

@ -70,7 +70,6 @@ export class NodeStore {
this.sendQueue = new SimpleNodeStore(this.db, 'send_queue')
this.nodesHistory = new SimpleNodeStore(this.db, 'nodes_history')
this.initializeRootNode()
.then(() => this.initializeClientUUID())
.then(() => resolve())
}
@ -110,13 +109,6 @@ export class NodeStore {
getRequest.onerror = (event) => reject(event.target.error)
})
}//}}}
async initializeClientUUID() {//{{{
let clientUUID = await this.getAppState('client_uuid')
if (clientUUID !== null)
return
clientUUID = crypto.randomUUID()
return this.setAppState('client_uuid', clientUUID)
}//}}}
node(uuid, dataIfUndefined, newLevel) {//{{{
let n = this.nodes[uuid]