Skip to main content

Auth Child Signup Signin Failure Rollback

EPIC: auth
Authentication + Onboarding
STORY: child_signup
As a child, I can sign up with a household code and a username to land in the household pending my parent's consent.
AC: signin_failure_rollback
When signIn throws after provisionChildAuth succeeds, the app calls signOut + deleteChildAuth (rollback) and shows a generic failure — no orphan auth.users row.

initial state — Welcome page (unauthenticated landing)

Expect:
  • booting signed out lands on the Welcome page
Events:
  • [ANALYTIC] [page]: WelcomeRoute

tap Sign in → sign-in page

User Actions:
  • Tapped: widget with key [<'WelcomePage.signIn'>]
Expect:
  • tapping Sign in on Welcome pushes the sign-in page
Events:
  • [ANALYTIC] [page]: SignInRoute
User Actions:
  • Tapped: widget with key [<'SignInPage.childSignupLink'>]
Expect:
  • tapping the child signup link navigates to ChildSignupPage
  • the child signup title renders
Events:
  • [ANALYTIC] [page]: ChildSignupRoute

fill all fields

User Actions:
  • Entered text: KID-CODE
  • Entered text: robin
  • Entered text: secure1234
  • Entered text: secure1234
  • Entered text: Robin
Events:
  • ChildSignupCodeChanged
  • ChildSignupUsernameChanged
  • ChildSignupPasswordChanged
  • ChildSignupConfirmPasswordChanged
  • ChildSignupDisplayNameChanged

tap Submit → signIn throws → rollback (signOut + deleteChildAuth) called and generic failure shown

User Actions:
  • Tapped: widget with key [<'ChildSignup.submit'>]
Expect:
  • stays on child signup page after signIn failure
  • the generic error copy is shown
Events:
  • ChildSignupSubmitted