Documentation

SwiftUI Authentication Container

A SwiftUI View that encapsulates sign in, account creation and password reset screens behind a single entry point.

AuthenticationView with a light color scheme. A SwiftUI Starter Kit Component.
AuthenticationView with a light color scheme.
AuthenticationView with a dark color scheme. A SwiftUI Starter Kit Component.
AuthenticationView with a dark color scheme.

Usage

AuthenticationContainer(
    model: AuthenticationContainerModel(
        userDidAuthenticate: { user in
            // do something with the User object.
        }
    )
)

Features

  • Manages navigation, error handling, and communicating to the wider system of successful authentication through a single entry point.
  • A User object is passed through AuthenticationContainerModel, through the userDidAuthenticate closure once authenticated.
  • Client side email and password validation are included in both sign in and account creation screens, respectively.
  • Supports light and dark device color schemes by default.
  • Supports font scaling via Dynamic Type.
  • Supports offline usage in SwiftUI Previews for easy debugging and testing.