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

When authorizing additional capabilities, authorize should keep polling until it gets the *new* capabilities #110

Open
travis opened this issue Oct 20, 2023 · 0 comments

Comments

@travis
Copy link
Contributor

travis commented Oct 20, 2023

Currently, if a user runs authorize more than once with the same agent, it will return immediately after sending the authorization email and will not automatically claim new delegations once the user has gone through the email authorization flow.

They can get the new capabilities later with w3 can access claim but a) this is non-obvious and b) it would be better to poll the way we do on our first trip through.

I think the best fix here would be to implement a more sophisticated DelegationChecker to use here:

https://github.com/web3-storage/w3up/blob/main/packages/access-client/src/agent-use-cases.js#L150

The new DelegationChecker should compare the delegations it gets with the list of delegations that were requested in the current authorization.

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

1 participant