verida-js icon indicating copy to clipboard operation
verida-js copied to clipboard

Enable web apps to open external databases they don't own

Open tahpot opened this issue 2 months ago • 0 comments

When opening an external database as a user, it's necessary to authenticate with the database.

When in a web application, this authentication must happen via the account-web-vault flow which prompts the user to scan a QR code and have the Verida Wallet generate accessToken and refreshToken for each endpoint the connecting account uses for the requested context.

However, when opening an external database, the endpoint that requires authentication is no necessarily (in fact unlikely) one of the endpoints the account is associated with.

As such, it's necessary to make the following changes:

  1. account-web-vault support making an authentication request, which specifies storage node(s) to authenticate with for a given context
  2. client-ts support supplying an endpoint(s) when opening an external database
  3. account support connecting to an account for a specific endpoint
  4. Verida Wallet support authenticating with a storage node endpoint sent in the QR code auth request

tahpot avatar May 01 '24 03:05 tahpot