Is my dApp tied to a domain?

#1

From what I can see, the users dApp privateKey is derived from his blockstack private key + the domain of the dApp.

Let’s say I would like to migrate a dApp to another domain, is there any way the users of the dApp can migrate their data as well? What I tried so far is to use a different domain than window.url in the authentication process but it seems like the authentication process fails, when the domain differs from redirect_url or manifest_uri.

There are multiple scenarios where this is important:

  1. A domain can get blocked in some countries by the goverment
  2. One might want to make his dApp accessible through different domains. Of course users expect to see the same data. ( one would like to see the same timeline no matter if he users thefacebook.com or facebook.com)

Thanks!

1 Like
#2

Yes, the app private key is tied to the domain.

What you really want is to use collections, see here how to integrate them in your apps: Data Portability: Developer Preview of the Contacts Collection

1 Like
#3

Can you explain how specifically collections will help with the OP’s original concern? If a government blocks access to an app’s domain how will existing users log in and continue to access to their data? How can a user access their data from more than one domain? Additionally, why are we even using domains when we have BNS?

#4

Collections are not tied to a domain name, therefore users can switch to a different app or a general collection explorer app.

Using BNS? Yes, please!!
Open questions are probably how users would resolve a name like oi-calendar.id.app in the currently available browsers

#5

Oh cool! That’s really great that you are working on a solution for this, fantastic!

From what I see this only solves one side of the issue, what if my app highly depends on sharing encrypted data with other users?
That they still will be able to decrypt their data after a move is solvable by just creating a collection specific private / public key pair (which I store in the collection), but will it be possible to share data with other users, using collections?

But for now, collections can help me to create at least a backup plan. Every user can store a backup of all the data he shares in a collection. If a domain switch becomes necessary they can easily copy the data from the collection and and share it again.

#6

Probably you can also create a collection for shared data. You could store links to the shared instances in that collection. Not sure about the concrete requirements you have.

1 Like
#7

True! The links will still work, even if the domain is gone. That’s way faster and needs less space.