Backend as a Service(BaaS)

This solution is designed for merchant applications/websites that wish to use HAT PDAs as outsourced user accounts. It's best suited for implementations where the data from a HAT will need to be accessed more than once or at regular intervals. With BaaS, users will need either to create a new HAT PDA or log in with their existing one.

Backend-as-a-Service

In order to register users via BaaS, the application or webpage needs to redirect users to the following URL:

https://hatters.dataswift.io/services/baas/signup

With the following query parameters:

"hat_name"
"email"
"application_id"
"redirect_uri"

If signup is successful the user will be redirected back to your application with query parameter token, the application token for that user.

If signup fails at any stage of the process, the user will be redirected back to your application with query parameters error and error_reason. It is left up to each individual application to decide how the failures should be communicated to the user. Currently error field will always have the value hat_provisioning. The error_reason field can have multiple values depending on the failure type:

  • out_of_capacity
  • duplicate_email
  • invalid_submission_data
  • user_cancelled
  • uncaught_error