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

Blockstack Auth Android application #22

Closed
sdsantos opened this issue Oct 2, 2020 · 21 comments
Closed

Blockstack Auth Android application #22

sdsantos opened this issue Oct 2, 2020 · 21 comments

Comments

@sdsantos
Copy link

sdsantos commented Oct 2, 2020

Background

The Blockstack authentication flow for an android app is not the most fluid or "easy" to use. Currently it involves opening a browser window to the app.blockstack.org website and creating a session there and then returning to the app. The browser app used might vary from device to device, sessions can be lost between uses, and returning to the app might not be smooth and involve some less straightforward Android dialogs.

At the same time, the Android platform has a huge growth potential for Blockstack. Although much is tied to Google, it allows app side-loading and third-party app stores. Our Blockstack app, Envelop, was developed both Web and Android, but its Android usage is 10x bigger. And months ago, while we still had cached profile data, Envelop was the Blockstack's multi-player app with most signups: https://blockmetric.xyz

So we want to make the Blockstack Android experience more seamless, by making a native Android Blockstack app to manage user authentication/identity. An app similar to the current Blockstack browser extensions, that would become the official Blocktack Android app. We believe it would do wonders to bring more users and developers into the Blockstack ecosystem.

Plus, it could be a stepping stone for:

  • Integrations with Blockstack wallets
  • A Blockstack Android app store

Project Overview

The goal of the project is to create a native Android app like https://app.blockstack.org/ and the Blockstack extension.

In our view, this application offers a simpler native experience, leading users to better trust Blockstack and the developer apps. Also, it's a more reliable way to reuse the same Blockstack account across apps, while still keeping the ability to manage identities as they wish.

If the user does not have the Blockstack Android app installed, the authentication would fallback seamlessly to a webview. But like the current Blockstack Connect, that incentivizes users to install the browser extension, it could incentivize to install the Android app.

Scope

The idea final app should have the same look and feel that app.blockstack.org, but with the native material look used in Android. It would rely upon the Android security features to keep the user information safe. We would match the same features currently on app.blockstack.org:

  • Create Account
  • Login
  • Logout
  • View Secret Key

Budget and Milestones

We looking for a grant of $5,000 USD for this project. Below is our roadmap:

Milestone 1: $1,500

  • Design the App UI/UX and review it with the Blockstack design team
  • Implement the internal storage based on Android KeyStore

Deliverables:

  • High-fidelity design prototype shared with the community
  • Repository created with a CI/CD pipeline working

Milestone 2: $1,500

  • Implement Login and identity management
  • Implement Logout and Secret Key screen

Deliverables:

  • Share WIP version of the app with the community

Milestone 3: $2,000

Deliverables:

  • Share release candidate of the app with the community
  • PR for the blockstack-android SDK with the integration

We expected this to take around 4 man-weeks of development work and 2 man-weeks of design work. The grant would be below our budget for a project like this, but the difference would be our investment in the community. With our current part-time availability, the whole project should take around 8 weeks to complete.

Future milestones:

  • Integration with other Blockstack wallet apps, or even develop a Blockstack wallet in it
  • Include a Blockstack Android App directory, based on App.co
  • Become a third-party Android app store
  • Integrate with smart contracts and transaction signing

Team

The Bloco team, builders of Envelop:

Risks

The trust implied in this app only works if it becomes the official Blockstack Android app. Therefore it depends on the community accepting it as such. It should be published within a Blockstack Google Play account, and hosted on a blockstack github repo.

We can also use the help of the Blockstack design team to keep the UI/UX consistent with the brand.

This app needs to be maintained, in order to keep up with the app.blockstack.org future updates.

Community and Supporting Materials

We've built a popular Blockstack app, Envelop, that's fully open-source. And we made contributions to the blockstack-android SDK. We've also hosted a Blockstack Meetup Portugal.

Although this app does not exist yet, we can build upon the work done on the blockstack-android SDK and @friedger's MVP: https://github.com/blockstack/blockstack-app-android

@friedger
Copy link

friedger commented Oct 2, 2020

Currently, there is a MVP for this kind of Android Identity Wallet at https://github.com/blockstack/blockstack-app-android
It is probably outdated with regards to dependencies and the UI is basic and full of bugs.

Manage account (View Secret Key in the future)
Screenshot_1601643108

Add new account
Screenshot_1601643173

View account
Screenshot_1601643180

@sdsantos
Copy link
Author

sdsantos commented Oct 2, 2020

Updated the grant (at the end) with the missing acknowledge that we will be building upon some of the work done already by the community. For example, we can definitely use part of the back-end work on @friedger 's MVP wallet!

@dantrevino
Copy link

dantrevino commented Oct 2, 2020

I love the idea from a user perspective, but why would we want something that is dependent on a centralized gatekeeper allowing it to exist? Isn't a better long-term plan to push users away from centralized platforms?

To this point, if we agree that open standards are a better direction, would a cordova/capacitor plugin be a better alternative, so that developers could leverage the benefits of android integration while keeping their applications censorship resistant?

@sdsantos
Copy link
Author

sdsantos commented Oct 2, 2020

@dantrevino the Google Play Store is a centralised platform, but an Android app in itself isn't.

And there are paths to avoid the Google Play Store:

  • self-publish the APK so others can install without going through the Google Play Store
  • make it available on F-Droid, the open source app store
  • turn it into a third-party app store for Blockstack apps, so we can help others avoid the Google Play Store

@dantrevino
Copy link

Wouldn't this be better off as an enhancement to the existing libraries, so that multiple apps could leverage it?

@sdsantos
Copy link
Author

sdsantos commented Oct 2, 2020

Wouldn't this be better off as an enhancement to the existing libraries, so that multiple apps could leverage it?

That was my first thought, expanding the android SDK to have a native auth experience. But @friedger reminded me that it's not ideal to have every app request your secret key. It should be an external app that you trust holding that information, and sharing it with other apps. Alike the app.blockstack.org or its browser extensions.

And with this app, all blockstack android apps can leverage it, since it will improve a lot the onboarding experience to anyone that has the app installed.

@blocks8
Copy link
Contributor

blocks8 commented Oct 7, 2020

Review Committee Feedback from 10/6/2020: We'd like more information on your proposal.

Thank you for your submission! We'd like to see the milestones and related funding broken down into smaller segments. I've broken down the roadmap items quickly, so please scope the accordingly with a milestone, deliverable, and amount of funding for each.

Milestone 1: $500
Design the App UI/UX and review it with the Blockstack design team
Implement the internal storage based on Android KeyStore
Deliverable: Visuals shared with the community

Milestone 2: $1000
Implement Login and identity management
Implement Create Account
Implement Logout and Secret Key screen
Integration with blockstack-android SDK: https://github.com/blockstack/blockstack-android/
Deliverable: Beta app shared with community for testing

etc...

Thank you for your submission and your work on updating the scope and milestones from the above feedback!

@sdsantos
Copy link
Author

sdsantos commented Oct 8, 2020

@blocks8 Just updated our proposal with milestones 👍

We also opened a PR on blockstack-android with a bulding block towards this app: stacks-archive/blockstack-android#181

@RaffiSapire
Copy link
Contributor

Hi @sdsantos we're pleased to approve your grant proposal. The next step will be to send you over a contract so we can disburse payment at the given milestones, please email grants@stacks.org with your contact information.

@blocks8
Copy link
Contributor

blocks8 commented Oct 26, 2020

@sdsantos - I haven't seen an email from you - please resend to continue the grant process. Thank you!

@sdsantos
Copy link
Author

We've already send one email from our operations manager. I've just resent it to grants@stacks.org.

@sdsantos
Copy link
Author

We have concluded the Milestone 1 of the project:

Should we start the next milestone straight away, or wait on your feedback?

@sdsantos
Copy link
Author

Here's our timeline for remaining milestones:

Milestone 2
9-16 December + 4-8 January

Milestone 3
11-29 January

@RaffiSapire
Copy link
Contributor

Hello! I will process payment for Milestone 2 today! Congrats and thank you for your amazing work.

@RaffiSapire
Copy link
Contributor

Hello! Thank you for all your hard work this year. We would love to send you a holiday note and some custom stacks stickers. Please email me at Raffi@stacks.org with you and your colleague's names/addresses if you'd like to receive one. We really appreciate all your help and contributions. Stacks is what it is because of you!

@sdsantos
Copy link
Author

sdsantos commented Jan 8, 2021

Milestone 2 is complete. Here's the deliverable: blocoio/stacks-circles-app#21 It has a demo video and a WIP version of the app. We will start the next and final milestone next week, and should finish it until the end of the month.

Since there are some new considerations with the naming of apps from the community, and this won't be an official app for now, the final app will probably have a different name.

@sdsantos
Copy link
Author

sdsantos commented Feb 3, 2021

We are a bit delayed with wrapping up Milestone 3. We ran into some implementation problems, trying to understand some internals of the Stacks Auth, and the issue leather-wallet/extension#946 also didn't help. But we will deliver it this week, and we can't wait for the community to try it out.

@hstove
Copy link

hstove commented Feb 3, 2021

Is there a plan to support authentication with web applications?

@sdsantos
Copy link
Author

sdsantos commented Feb 3, 2021

@hstove we weren't planning to, but the implementation we used actually works great with web apps on an Android phone. So yes, now it's part of the plan :)

@dantrevino
Copy link

I would suggest that web app support is a requirement for any platform. So, good to hear.

@sdsantos
Copy link
Author

sdsantos commented Feb 5, 2021

Milestone 3, the final one, is complete!

The app is now called Stacks Circles or just Circles.

Here is the PR marking the 0.1 release, linking to an APK where you can try it out: blocoio/stacks-circles-app#28

As soon as the app is approved on Google Play, we'll start a beta program here: https://play.google.com/apps/testing/io.bloco.circles

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

No branches or pull requests

8 participants