DEV Community

loizenai
loizenai

Posted on

1

Kotlin Firebase Authentication – How to Sign Up, Sign In, Sign Out, Verify Email | Android

https://grokonez.com/android/kotlin-firebase-authentication-how-to-sign-up-sign-in-sign-out-verify-email-android

Kotlin Firebase Authentication – How to Sign Up, Sign In, Sign Out, Verify Email | Android

Firebase Authentication provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app. In this tutorial, we're gonna build a simple register/login Android App using Firebase Email & Password authentication with Kotlin language.

More Practice:

I. Way to do

1. Add Firebase to Android Project

1.1 Step by step

  • Create new Android App including Kotlin support.
  • From menu bar, Tool -> Firebase:
    kotlin-firebase-auth-setup-tool

  • Assistant window will be shown. Choose Authentication, then click on Email and password authentication:
    kotlin-firebase-auth-setup-0

  • At the step 1, click on Connect to Firebase:
    kotlin-firebase-auth-setup-1

  • In new Window, choose Create new Project and fill in the name of Firebase Project:
    kotlin-firebase-auth-setup-2

  • Click on Connect to Firebase, the Browser will show new Firebase Project that has just been created:
    kotlin-firebase-auth-setup-5

  • Come back to Android Studio, at the step 2, click on Add Firebase Authentication to your app:
    kotlin-firebase-auth-setup-3

  • You will see a new window that shows the code will be add to build.gradle files. Click on Accept Changes:
    kotlin-firebase-auth-setup-4

  • Now view your Project under Project type, you can see google-services.json file:
    kotlin-firebase-auth-setup-json

    1.2 Check dependencies

    Open Gradle file to check what happens, we can see that some code has been added:

  • build.gradle (project-level):

    
    buildscript {
    // ...
    dependencies {
        // ...
        classpath 'com.google.gms:google-services:3.1.0'
    }
    }
    

More at:

https://grokonez.com/android/kotlin-firebase-authentication-how-to-sign-up-sign-in-sign-out-verify-email-android

Kotlin Firebase Authentication – How to Sign Up, Sign In, Sign Out, Verify Email | Android

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Billboard image

📊 A side-by-side product comparison between Sentry and Crashlytics

A free guide pointing out the differences between Sentry and Crashlytics, that’s it. See which is best for your mobile crash reporting needs.

See Comparison

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay