$ hush signup <email>
> Enter your name: Jake Klassen
A verification email has been sent to <email>. It will expire in 5 minutes.
> Enter verification code: AJ4DJ3
Welcome to Hush.
Here is your master password: "we-will-generate-this-for-you"
Do not lose this. You cannot reset your master password and will be
forced to create a new PGP keypair if you lose it. We recommend
using a password manager to avoid losing your master password!
If a user with <email> already exists, a friendly warning message is shown: A user with email <email> already exists., and the operation is aborted.
Technical Details
When the user has completed data entry via the CLI, an email containing a six character code will automatically be sent to their email address.
If the email is already registered, display the friendly notification and abort.
Models
Keypair
A user may only have one active keypair. Many may exists due to recovery from hacks etc - not relevant to this feture.
When a new user is created a new keypair must be created.
When a new user signs up the client will POST to this route with the body noted below.
If a user already exists with this email address an error is returned. Otherwise a new signup is created containing a random 6 character code, which is only valid for 5 minutes.
If the code is valid, a new user is created with the publicKey and privateKey provided in the request. The signup document status must be marked as "complete".
Responses
201 - Newly created
Response body not implemented in this version. Models and transactions needs to be planned first.
See #3 for first major batch of work. Still need to handle side effects of creating a verified signup. Such as, creating user, keypair, organization and auth token.
Requirements
As a user I should be able to sign up.
If a user with
<email>
already exists, a friendly warning message is shown:A user with email <email> already exists.
, and the operation is aborted.Technical Details
When the user has completed data entry via the CLI, an email containing a six character code will automatically be sent to their email address.
If the email is already registered, display the friendly notification and abort.
Models
Keypair
A user may only have one active keypair. Many may exists due to recovery from hacks etc - not relevant to this feture.
When a new user is created a new keypair must be created.
Signup
Only one active signup may exist for a user and is only valid for 5 minutes.
User
Api Endpoints
POST
/signups
When a new user signs up the client will POST to this route with the body noted below.
If a user already exists with this email address an error is returned. Otherwise a new signup is created containing a random 6 character code, which is only valid for 5 minutes.
Request body:
Responses
201
- Newly created200
- Existing unverified signup409
- Conflict, email already verified.POST
/verified-signups
When a user enters a signup code, the cli attempts to verify it and must send:
If the code is valid, a new user is created with the
publicKey
andprivateKey
provided in the request. The signup documentstatus
must be marked as"complete"
.Responses
201
- Newly createdResponse body not implemented in this version. Models and transactions needs to be planned first.
404
- Sign with idsignupId
not found.409
- Conflict, email already verified.