Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Hotfix to correct gaiaHubConfig info in profile.json #1776

Merged
merged 8 commits into from Jan 8, 2019

Conversation

hstove
Copy link
Collaborator

@hstove hstove commented Jan 7, 2019

No description provided.

@kantai
Copy link
Collaborator

kantai commented Jan 7, 2019

Can you add a state change version bump to force a rewrite?

@hstove hstove requested review from yknl and kantai January 7, 2019 19:38
@hstove
Copy link
Collaborator Author

hstove commented Jan 7, 2019

The way the state update logic works is that it updates the profile.json for all local identities you have in the browser. This should be sufficient, because the only effected profile.json's are the ones you've logged into with in your browser.

It iterates and updates all profile.json's before even updating state.

When updating the profile.json, it creates a new Gaia token before signing, so any effected Gaia tokens in the profile.json will not be used. This means they can be invalidated before doing the state update, and the write will still work.

@kantai
Copy link
Collaborator

kantai commented Jan 7, 2019

When updating the profile.json, it creates a new Gaia token before signing, so any effected Gaia tokens in the profile.json will not be used. This means they can be invalidated before doing the state update, and the write will still work.

Yep -- can confirm that this is the case: the uploadProfile function here https://github.com/blockstack/blockstack-browser/blob/f2b12bf51123a696ef64fd65c730ebe050e04eb2/app/js/account/utils/index.js#L84
always tries to generate a new token on the fly, anyways.

@kantai
Copy link
Collaborator

kantai commented Jan 7, 2019

This worked for me as well, @hstove

Copy link
Collaborator

@yknl yknl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works well for me.

app/js/update/index.js Outdated Show resolved Hide resolved
@hstove
Copy link
Collaborator Author

hstove commented Jan 8, 2019

Thanks for the reviews. I also removed the calls to add browserVersion in the gaia token payload, as it's no longer necessary.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants