Module 08 Β· Auth: Sign Up, Log In, Stay In β Lesson 3 of 4 Β· ~12 min
The Auth Screen
One screen, two modes
Login and signup share every field except name (and the role picker). Two separate screens would be near-duplicates β so PawWalk ships one AuthView with a private Mode enum: .login or .signup. All the wording differences live as computed properties on the enum itself β the title, the button label, the "New here?" hint. Flip mode, and every string on screen flips with it.
The screen's state is a handful of @State fields β email, password, name, the chosen role, plus isSubmitting and validationMessage. And it reaches the shared AuthSession the way you learned in Module 5: @Environment(AuthSession.self).