waggle_auth 0.3.2 copy "waggle_auth: ^0.3.2" to clipboard
waggle_auth: ^0.3.2 copied to clipboard

unlistedoutdated

A Vatorex AG package containing Authentication logic used in Vatorex apps.

waggle_auth #

waggle_auth is an flutter-firebase authentication package that will be useful for multiple Vatorex Flutter apps that uses or will use the same functions across them.

Features #

waggle_auth encloses the three main authentication process in the app: Login, Create Account and Forgot Password.

It also allow to login with Google, Facebook and Apple if configured correctly following the steps in the Getting started section.

Getting started #

As a pre requisite the steps indicated in the Firebase web page must be completed

https://firebase.google.com/docs/flutter/setup?platform=ios

Aditionally for loggin in with different providers: Facebook, Google, Apple:

https://firebase.flutter.dev/docs/auth/social/

Usage #

Login Widget

            LoginWidget(
                createAccountButtonLabelText: "Create Account",
                ressetPasswordLabelText: "Resset Password",
                logginButtonText: "Login",
                passwordlessLoginButtonText: "Passwordless Login",
                googleLoginButtonText: "Sign In with Google", // Optional
                facebookLoginButtonText: "Sign In with Facebook", // Optional
                appleLoginButtonText: "Sign In with Apple", // Optional
                onForgotPasswordTap: () {
                  // Callback for ForgotPassword button 
                  // Add Logic here
                },
                onCreateAccountPressed: () {
                  // Callback for CreateAccotunt button 
                  // Add Logic here
                })

if an optional String is not set, the button corresponding to the text will not be displayed,

CreateAccount Widget

            CreateAccountWidget(
                authRouteLoginButtonText: "Already have an account? Login",
                onLoginPressed: () {
                  // Callback for "Already have an account? Login" button 
                  // Add Logic here
                },
                displayNameString: "Name",
                authSwitchTermsAndServices: "Terms & Services",
                authErrorMissingTerms: "You must accept terms and services berfore continuing",
                authButtonCreateAcount: "Create Account",
                validatorCode: (code) {
                    // sends back the Failure code to be handle by the app
                    // Ex. l10n.common_error_valueFailure(code)
                },
            ),