Skip to content

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

@travis

Description

@travis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions