FirebaseUI Authentication provides a drop-in auth solution that handles the UI flows for signing in users on your Firebase application.
This library can be easily integrated into your project with minimal configuration.
Install the library using npm:
npm install firebaseui-auth --save
Implement the Firebase login component in your application:
<firebase-login [auth]="auth" [uiConfig]="uiConfig"></firebase-login>
-
auth
: An instance of Firebase Auth. This is required for the component to function properly. -
uiConfig
: Configuration object as defined in the FirebaseUI Web documentation. See the details below or visit the official configuration guide.
Configure the auth module as per the FirebaseUI documentation:
Handle sign-in events using the provided callbacks:
<firebase-login
[auth]="auth"
[uiConfig]="uiConfig"
(signInSuccessWithAuthResult)="successCallback($event)"
(signInFailure)="errorCallback($event)"
(uiShown)="uiShownCallback()"
></firebase-login>
successCallback(signInSuccessData: FirebaseUISignInSuccessWithAuthResult) {
// Handle successful sign-in.
}
errorCallback(errorData: FirebaseUISignInFailure) {
// Handle sign-in failure.
}
uiShownCallback() {
// Execute code when the UI is displayed.
}
Supporting the project details are coming soon.
This project is licensed under the MIT License - see the LICENSE file for details.
Kartik Watwani - kartik@workern.com