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
DesignUI ComponentsSections
UI Components Live gallery
What the Identity service ships for apps to use, as the package packages/ui-identity.
Each built component is shown live, from its package, in each of its states. Pick a state to see it; every state has its own stand-in for the service's API, with made-up data (CORE-V1-E0-19).
Components call only the Identity API. They never read cookies or tokens from JavaScript; the session cookie is HttpOnly.
They ship as the package packages/ui-identity and are used by any app, not only DocFlow.
Every state listed above is designed, including loading and failure.
Keyboard reachable, visible focus, labelled controls, WCAG AA contrast, and usable at 320 pixels wide in light and dark mode.
In version 1 the forms that take a password are AWS Cognito's hosted pages. 01scale never renders a password field.
SignInButton
Component
A link that starts sign-in.
Inputs
returnTostring, optional
Page to land on afterwards. Defaults to the current page.
labelstring, optional
Button text. Default 'Sign in'.
States
Default
Focus (visible outline)
Calls
GET /auth/login?mode=signin
●LiveFrom the package, synthetic data
Starts sign-in on the hosted page.
CreateAccountButton
Component
A link that starts sign-up.
Inputs
returnTostring, optional
Page to land on afterwards.
labelstring, optional
Button text. Default 'Create account'.
States
Default
Focus
Calls
GET /auth/login?mode=signup
●LiveFrom the package, synthetic data
SessionProvider and useSession()
Provider and hook
Asks Identity once who is signed in and shares the answer with every component on the page.
Inputs
childrennodes
The part of the page that needs to know the user.
States
loading
signed_in with user.id and user.email
signed_out
Calls
GET /session
●LiveFrom the package, synthetic data
{
"status": "loading",
"user": null
}
UserMenu
Component
Shows the signed-in user's email with a Sign out action, or the Sign in button when signed out.
Inputs
returnTostring, optional
Passed to the Sign in button.
States
Loading (placeholder of the same size, so the header does not jump)
Signed out (shows SignInButton)
Signed in, closed
Signed in, open
Calls
GET /session (through useSession)
POST /auth/logout
●LiveFrom the package, synthetic data
Yyou@example.com
SignOutButton
Component
Ends the session and follows the returned logout address.
Inputs
labelstring, optional
Button text. Default 'Sign out'.
States
Default
Working (disabled while the request runs)
Failed (keeps the user signed in and shows a retry)
Calls
POST /auth/logout
●LiveFrom the package, synthetic data
RequireSignIn
Wrapper
Wraps a page that needs a signed-in user. Backs up the gateway's redirect for pages rendered in the browser.
Inputs
childrennodes
The protected content.
fallbacknode, optional
Shown while the session is loading.
States
Loading (shows fallback)
Signed in (shows children)
Signed out (redirects to sign-in with return_to set to the current page)
Calls
GET /session (through useSession)
GET /auth/login
●LiveFrom the package, synthetic data
Checking who is signed in…
SignInError
Page
The page at `/sign-in-error` that a browser lands on when sign-in fails: a plain-language message and one button to start again.
Inputs
codestring
The error code from the callback, mapped to a friendly message.
States
One message per error code
Unknown code (generic message)
Calls
GET /auth/login
●LiveFrom the package, synthetic data
Sign-in took too long
!
For your security, sign-in has to finish within 10 minutes.
Pages provided by AWS Cognito in version 1
These are not 01scale components. 01scale's own pages replace them in version 2.
Sign in
Email and password, with links to create an account and to reset the password.
Create account
Email and password with the 12-character rule shown.