verida-js
verida-js copied to clipboard
Enable web apps to open external databases they don't own
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:
-
account-web-vault
support making an authentication request, which specifies storage node(s) to authenticate with for a given context -
client-ts
support supplying an endpoint(s) when opening an external database -
account
support connecting to an account for a specific endpoint - Verida Wallet support authenticating with a storage node endpoint sent in the QR code auth request