SwiftUI Authentication Container
A SwiftUI View that encapsulates sign in, account creation and password reset screens behind a single entry point.
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
Userobject is passed throughAuthenticationContainerModel, through theuserDidAuthenticateclosure 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.