oddsdk/odd-app-template

Localhost domain user names are not unique.

Closed this issue · 3 comments

This probably requires some more investigation - it seems like when I run WAT on localhost and try to create a new user 'jeff' - if I have run any other WAT app on localhost and created a user named 'jeff' the system says the name is taken.

This is an interesting problem, once we have more developers all wanting their own first name as their user on multiple localhost'd apps, over time this will become an annoyance. Maybe there's something we can do to treat localhost as a special case?

bgins commented

Once we have merged the filesystem recovery work in #101 and #102 each user should have a unique name because their display name will be appended by their DID.

The other change needed for this to work will be assigning each WAT app a unique namespace.

https://github.com/webnative-examples/webnative-app-template/blob/ddd5f1d92eb9c806f37578d717f0830778c1f5b9/src/lib/app-info.ts#L6

Changing the creator or name will create a unique namespace for the app in browser storage. That should make it possible to register a new 'jeff` made unique by the DID in their underlying username.

It's worth exploring this outside of WAT because it depends on the filesystem recovery work. The work in oddsdk/ts-odd#421 may provide a path forward for this because developers could use it to define a username scheme that makes each username unique in some way.

Oh yeah! That was smart of us.

bgins commented

Implemented in #101 and #102.