Products · Identity V1

Login using AWS

Sign up, sign in and password reset with AWS Cognito, integrated through standard OIDC.

Version 1 · Login with AWS CognitoDesigned, not builtModule 1 of 15

DesignUser JourneySections

User Journey

What a person sees and what the system does, for login in version 1.

Create an account

Starts when: Taps Create account on any 01scale page.

  1. The personTaps Create account.

    The systemIdentity starts a login and sends the browser to the sign-up page hosted by AWS Cognito.

  2. The personEnters an email and a password of 12 or more characters.

    The systemCognito checks the password rules and emails a 6-digit code.

  3. The personEnters the code from the email.

    The systemCognito marks the email as verified and sends the browser back to 01scale.

  4. The personLands on the page they wanted, signed in, with their email shown in the header.

    The systemIdentity creates the user and a session, sets the session cookie, and records auth.signup and auth.signin.

Result: A verified user exists and is signed in for 7 days on this browser.

Sign in

Starts when: Taps Sign in.

  1. The personTaps Sign in.

    The systemIdentity sends the browser to Cognito's sign-in page.

  2. The personEnters email and password.

    The systemCognito checks them and sends the browser back with a one-time code.

  3. The personLands on the page they wanted, signed in.

    The systemIdentity checks the response, finds the user, creates a session and records auth.signin.

Result: A new session on this browser. Sessions on other devices are untouched.

Open a protected page while signed out

Starts when: Opens a page such as /documents without being signed in.

  1. The personOpens the link.

    The systemThe gateway sees there is no session and redirects to sign-in, remembering the page as return_to.

  2. The personSigns in (or creates an account).

    The systemAs in the journeys above.

  3. The personArrives on the page they first asked for.

    The systemIdentity redirects to return_to, which may only be a page on 01scale.com.

Result: The user never has to find their way back.

Forgot password

Starts when: Taps Forgot your password? on the sign-in page.

  1. The personEnters their email.

    The systemCognito answers the same way whether or not the account exists, and emails a reset code if it does.

  2. The personEnters the code and a new password.

    The systemCognito changes the password.

  3. The personSigns in with the new password.

    The systemIdentity creates a new session and revokes every older session for that user, recording auth.sessions_revoked.

Result: Only the browser that just signed in stays signed in.

Sign out

Starts when: Opens the user menu and taps Sign out.

  1. The personTaps Sign out.

    The systemIdentity revokes the session, clears the cookie and records auth.signout.

  2. The personIs returned to the home page, signed out.

    The systemThe browser is sent through Cognito's logout address so Cognito's own session ends too.

Result: The next sign-in shows the login form again. A token already issued to a service stops working within 5 minutes.

When something goes wrong

Cancels on the sign-in pageprovider_error
Returns to 01scale signed out, with a short message.
Takes longer than 10 minutes to sign inlogin_expired
Sees 'Sign-in took too long' and a button to start again.
Opens the sign-in link in a different browserlogin_state_mismatch
Sees 'Sign-in could not be completed' and starts again.
Has not verified their emailemail_not_verified
Is asked to enter the code first; no 01scale user is created.
Session reaches 7 daysnot_authenticated
Is asked to sign in again and returns to the same page.
AWS Cognito is unavailableprovider_unavailable
Sees 'Sign-in is temporarily unavailable. Try again.'
Has an email longer than 254 charactersemail_not_supported
Sees 'This email address can't be used with 01scale.' No user is created.