radiks icon indicating copy to clipboard operation
radiks copied to clipboard

Request: User model nested profile data grows stale

Open kkomaz opened this issue 5 years ago • 1 comments

When the user initially signs into an application and gets registered via User model via await User.createWithCurrentUser(), a document is created with some nested data via profile.

At that moment in time the profile information matches what you would normally see from a normal lookup.

However, as the user adds more apps and possibly runs into the bug of using older blockstack browsers, the apps array between a user model and his/her profile.json can be out of sync.

Example:

profile.json via lookupProfile

screenshot of google chrome 3-2-19 4-29-42 am

profile via User model

screenshot of google chrome 3-2-19 4-21-02 am

Not sure what the best workaround for this because it will be hard to tell when a user's profile apps was updated. Either way, do you think adding an additional function on the User model to update his/her profile should/could be provided? Thanks!

kkomaz avatar Mar 02 '19 17:03 kkomaz

Yes, definitely we could add a method to User, maybe something like updateProfile() or something.

hstove avatar Mar 02 '19 19:03 hstove