Skip to content
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

NIP-07: Lack of permissionless check whether currently active user has authorized methods #1421

Open
alopatindev opened this issue Aug 12, 2024 · 3 comments

Comments

@alopatindev
Copy link
Contributor

I found that current ways web apps handle persistent sessions are too limited or broken:

  • some web apps don't remember user account at all and require pressing Login button on every page refresh
  • some remember the account but don't react on the fact that the user actually switched it in their browser extension
  • some apps ask for permissions out of the blue, probably to make sure that it's the same user that was logged in before.

Could we have some permissionless API to check whether currently active user has already authorized certain methods for the given website? Something like

async getAuthorizedMethods(): { getPublicKey: boolean, getRelays: boolean, ... }

I believe that could be one of the things that simplifies session management in web apps and possibly makes web apps more complete and predictable for end-users.

@alopatindev alopatindev changed the title NIP-07: Permissionless check whether currently active user has authorized methods NIP-07: Lack of permissionless check whether currently active user has authorized methods Aug 12, 2024
@staab
Copy link
Member

staab commented Aug 12, 2024

Those mostly seem like flaws in implementation. I for one wouldn't use this. What I would like is a way to get notified if permission is revoked (for both nip 07 and 46).

@alopatindev
Copy link
Contributor Author

What I would like is a way to get notified if permission is revoked (for both nip 07 and 46).

Sounds good, at least from the first glance.

Will it work if user revoked permission on one device but allowed on the other one? (or we don't want to support that?)

Most importantly, what should happen if user switched the user account in the browser extension? Is it the same as revocation in this design?

@erskingardner
Copy link
Contributor

Those mostly seem like flaws in implementation. I for one wouldn't use this.

I agree with this. Feels like a solution looking for a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants