mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
Some more little fixes to authrecall
This commit is contained in:
parent
ac05d24d88
commit
c5043c92a8
9
sea.js
9
sea.js
@ -505,12 +505,11 @@
|
||||
const props = parseProps(await seaRead(remember, pub, true))
|
||||
let { pin, alias: aLias } = props
|
||||
|
||||
if (!pin || alias === aLias) {
|
||||
// No PIN, let's try short-term proof if for matching alias
|
||||
pin = (await checkRememberData(props)).pin
|
||||
}
|
||||
return (!pin && alias === aLias)
|
||||
// No PIN, let's try short-term proof if for matching alias
|
||||
? await checkRememberData(props)
|
||||
// Got PIN so get IndexedDB secret if signature is ok
|
||||
return await checkRememberData(await readAndDecrypt(await seaIndexedDb.get(alias, 'auth'), pub, pin))
|
||||
: await checkRememberData(await readAndDecrypt(await seaIndexedDb.get(alias, 'auth'), pub, pin))
|
||||
}
|
||||
// got pub, try auth with pin & alias :: or unwrap Storage data...
|
||||
const args = pin ? { pin, alias } : await readStorageData()
|
||||
|
Loading…
x
Reference in New Issue
Block a user