-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
ual-scatter/src/ScatterUser.ts
Line 51 in fdd40e0
| public async verifyKeyOwnership(challenge: string): Promise<boolean> { |
Calling this function with a 12-character random string as a parameter always returns false.
Modifying the function as follows will do the desired behavior. Is this a bug or is there some other intended situation?
public async verifyKeyOwnership(nonce: string, toSign: string, publicKey: string): Promise<boolean> {
return new Promise((resolve, reject) => {
setTimeout(() => {
reject(new Error('verifyKeyOwnership failed'))
}, 1000)
this.scatter.authenticate(nonce, toSign, publicKey).then(async (res) => {
const pubKey = ecc.recoverHash(res, ecc.sha256(ecc.sha256(toSign) + ecc.sha256(nonce)));
const myKeys = await this.getKeys()
for (const key of myKeys) {
if (key === pubKey) {
resolve(true)
}
}
resolve(false)
})
})
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels