Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Todos app identity not working as documented with Web Wallet #1171

Closed
pgray-hiro opened this issue May 26, 2021 · 7 comments
Closed

Todos app identity not working as documented with Web Wallet #1171

pgray-hiro opened this issue May 26, 2021 · 7 comments
Labels
bug Something isn't working stale

Comments

@pgray-hiro
Copy link
Contributor

The Todos App tutorial is centered around signing in using the old Blockstack ID system. The app will allow you to sign in with the web wallet, but is broken when making your Todos public (doesn't generate the correct sharing URL). There are other subtle breakages, as when the application won't show any user identity if the user doesn't own an ID in their wallet.

As I see it, there are two potential solutions to this issue:

  • Rework the application to use something other than an identity to generate the sharing URL
  • Create an easy way for users to create an identity and modify the copy of the documentation to include instructions on how to do that

The first would be the easier solution, but the second may be more pragmatic, as the creation of an easy identity purchase/generation application is likely necessary for other apps in the ecosystem.

@pgray-hiro pgray-hiro added the bug Something isn't working label May 26, 2021
@markmhendrickson
Copy link
Contributor

@wilsonbright I believe you mentioned awhile back having code you use to pull public Gaia data for a user without needing a username. Would you mind sharing it? If so, we could perhaps rework the app to generate sharing URLs with the user's identity address instead of username.

@ilayaperumalraja
Copy link

@markmhx , Form public URL with out username,

  1. Get the gaia hub address of user from userSession object.
    let gaiaHubAddress = userSession.loadUserData().gaiaHubConfig.address;

  2. Put file with unique name to gaia and it should be decrypted.
    userSession.putFile("uniqueName", "content", {encrypt: false});

  3. Form gaia url and make a http call to get a file directly from gaia by (gaiaHubAddress + uniqueName).
    let directFileLoaction = "https://gaia.blockstack.org/hub/" + gaiaHubAddress + "/" + "uniqueName";
    Make a http call to "directFileLoaction" url. You will receive a file content.

  4. Form publicly shareable url
    In previous setup, we need two dynamic values to form gaia URL "gaiaHubAddress and uniqueName". These values need to be part of publicly shareable URL.
    https://yourdomain/gaiaHubAddress/uniqueName

@markmhendrickson
Copy link
Contributor

Thanks @ilayaperumalraja! Note that @aulneau also has an app in the works that will help with the alternative path of having them register a username elsewhere then use the todos app. So with this code guidance and that app available soon, both options seem viable.

@markmhendrickson
Copy link
Contributor

markmhendrickson commented Jun 23, 2021

Note that the related Stacks.js fix for querying public user data without a username is filed here: hirosystems/stacks.js#802

We may want to document the snippet provided above (#1171 (comment)) in the meantime within the data storage guide or similar.

@markmhendrickson
Copy link
Contributor

@pgray-hiro the team discussed this issue and we're thinking it'd be best to link to the .BTC app for now from the documentation, indicating that users should buy a username from there before proceeding with the todos app.

We're also discussing the re-enabling of free username registration in the web wallet for Q3 but it's not yet clear if we'll prioritize it. And it seems best to unblock the docs with a solution for now, even if we eventually get that enhancement in place.

How's that sound?

@stale
Copy link

stale bot commented Dec 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 26, 2021
@stale
Copy link

stale bot commented Jan 3, 2022

This issue has been automatically closed. Please reopen if needed.

@stale stale bot closed this as completed Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants