Firebase Essentials - Android Edition - EBookFrenzy

Transcription

Firebase EssentialsAndroid Edition

Firebase Essentials – Android EditionFirst Edition 2017 Neil Smyth / Payload Media, Inc. All Rights Reserved.This book is provided for personal use only. Unauthorized use, reproduction and/or distribution strictly prohibited.All rights reserved.The content of this book is provided for informational purposes only. Neither the publisher nor the author offersany warranties or representation, express or implied, with regard to the accuracy of information contained in thisbook, nor do they accept any liability for any loss or damage arising from any errors or omissions.This book contains trademarked terms that are used solely for editorial purposes and to the benefit of the respectivetrademark owner. The terms used within this book are not intended as infringement of any trademarks.Rev 1.0

Table of Contents1. Introduction .11.1 Downloading the Code Samples . 11.2 Feedback . 11.3 Errata . 12. Getting Started with Firebase .32.1 Signing into the Firebase Console . 32.2 Creating a New Project . 42.3 Firebase Projects . 52.4 Firebase Pricing Plans . 52.5 Summary . 53. Firebase User Authentication .73.1 An Overview of Firebase Authentication . 73.1.1 FirebaseAuth Instance . 73.1.2 AuthUI Instance . 83.1.3 FirebaseUser Class . 83.1.4 AuthCredential Classes . 83.1.5 Authentication Provider Classes . 83.2 FirebaseUI Auth Authentication . 93.3 Firebase SDK Authentication . 93.4 Summary . 104. Email/Password Authentication using FirebaseUI Auth . 114.1 Creating the Example Project . 114.2 Connecting the Project to Firebase . 114.3 Adding the FirebaseUI Project Dependencies . 144.4 Enabling Firebase Email/Password Authentication . 154.5 Adding the Signed-In Activity . 164.6 Designing the SignedInActivity Layout . 164.7 Firebase Initialization Steps . 174.8 Initiating the Sign-in Process. 184.9 Handling the Sign In Activity Result . 194.10 Handling the Sign-in . 204.11 Signing Out. 214.12 User Account Removal . 224.13 Summary . 235. Testing and Customizing FirebaseUI Auth Authentication . 255.1 Authentication Testing Environment . 255.2 Firebase Console User Management . 255.3 Testing the FirebaseAuth App. 265.4 Customizing the Password Reset Email Message . 275.5 Testing the Password Reset . 305.6 Enabling Smart Lock for Passwords . 305.7 Color Customization. 325.8 Specifying a Logo . 33i

5.9 Deleting the Test Account . 345.10 Summary . 346. Google Sign-In Authentication using FirebaseUI Auth . 356.1 Preparing the Project . 356.2 Obtaining the SHA-1 Fingerprint . 356.3 Adding the SHA-1 Key to the Firebase Project . 366.4 Enabling the Google Sign-In Method . 376.5 Adding the Google Sign-In Provider within the App . 386.6 Testing Google Sign-In . 396.7 Displaying the User’s Profile Photo . 416.8 Summary . 447. Facebook Login Authentication using FirebaseUI Auth . 477.1 Preparing the Project . 477.2 Obtaining the Facebook App ID and App Secret . 477.3 Adding the App ID and Secret to the Firebase Project . 497.4 Adding the Facebook Login Product to the App . 497.5 Setting the OAuth Redirect URI . 507.6 Adding the Debug and Release Key Hash . 517.7 Modifying the App . 527.8 Testing Facebook Login Authentication . 547.9 Summary . 568. Twitter Sign-In Authentication using FirebaseUI Auth . 578.1 Preparing the Project . 578.2 Enabling Twitter Authentication . 578.3 Creating a Twitter App . 578.4 Obtaining the Twitter API Keys . 588.5 Generating the Access Token . 598.6 Adding the API Keys to the Project . 598.7 Adding Twitter to the Provider List. 608.8 Adding the Twitter Library Dependency . 608.9 Testing Twitter Authentication . 608.10 Summary .

Firebase Essentials – Android Edition First Edition 2017 Neil Smyth / Payload Media, Inc. All Rights Reserved. This book is provided for personal use only.