-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth Attempt Failed: Public Key Does Not Exist #574
Comments
@amark Found a work around. The way that recall is handled is interesting but there's problems with // Instantiating Gun
const gun = Gun({
peers: ['http://localhost:8082/gun'],
recall: true
});
...
// Elsewhere in whatever is used to check for authentication
public async isAuthenticated(): Promise<any> {
const tmp = window.sessionStorage;
if (tmp) {
if (tmp.alias && tmp.tmp) {
try {
await this.login({ username: tmp.alias, password: tmp.tmp});
return true;
} catch (e) {
console.log(e);
}
}
}
return false;
} I'm hoping to contribute to helping address whatever issues currently exist with SEA for auth. Let me know if what above doesn't make sense. |
@amark I thought my work around above worked, but it actually doesn't :( . When trying to access User nodes, nothing was happening. Below are screenshots of the same attempt to Right after logging inRight after refreshTurns out those sessionStorage items are only temporary and they are gone on refresh. |
@amark Closing this for now. It got muddied with different issues I ran into. Here's the gist of what I have done to make this work by doing my own storage management. |
@509dave16 excellently reported, thank you for the thoroughness, it is super appreciated/helpful. And also super thanks for dealing with workarounds for now.
It seems to me that maybe it isn't |
@509dave16 did you find out how you solved the "Public key is missing" error? I can't seem to get past it. |
@jadbox I avoided using My personal recommendation would be to avoid using SEA for now. And just use straight up gun. If you alias it like 'const gunUser = gun; |
TLDR
@amark I think the issue stems from the gunRoot not being populated with 'public key': 'user' pairs. query.js looks for those. After create.js puts one on the root, I can see it on my server peer and my browser peer. But for some reason on refresh, the direct children of the root for public keys are not there anymore on the browser peer.
Expected behavior
When executing
gun.user().auth(<username>,<password>, cb)
, I expect that a previously created user should be logged in.Resulting behavior
Troubleshooting Information
Hypothesis
gunRoot.get(pub).get((at, ev) => {
(offender) is trying to access a path where there is no put value.The text was updated successfully, but these errors were encountered: