This is a follow-up on the 2017-08-04 Blockstack on iOS Meeting with @jorge and @jeremyrwelch
- Logan (Casa)
- Scott (Casa)
Authentication on iOS
We discussed how authentication will work on iOS.
- Blockstack for iOS implements the
blockstack: protocol handler.
- App generates an authentication request which is in the form of a JSON Web Token.
- App calls the
blockstack: protocol handler with the authentication request and iOS sends this request to the Blockstack for iOS app.
- User is presented with a sign in request user interface.
- If user approves sign in, Blockstack for iOS requests a session token from the light core node running in the cloud. This provides permissioned access to the user’s storage.
- Blockstack for iOS generates a response that includes the session token and calls the app’s custom protocol handler to reply with response.
- App decodes the authentication response. It uses the included session token to access storage via the cloud core node and the included app private key for encryption and signing of data.
Implementing blockstack.js functionality on iOS
We discussed a few approaches to implementing the functionality:
Rewrite the blockstack.js stack in Swift or Objective-c
This is a lot of work and we’re not sure how many of the dependencies exist.
Wrap blockstack.js in a Swift API
- Blockstack core team will provide more guidance as to the time frame for mobile storage support at the end of the current (0.14) sprint on August 14, 2017.
- Logan will take a crack at wrapping blockstack.js in Swift API