Coder Social home page Coder Social logo

7rajatgupta / firebase-authentication Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 88 KB

A Demo App for Firebase Sign Up Authentication system.

Java 100.00%
firebase firebase-auth firebase-database firebase-authentication firebase-db firebase-functions android android-application android-studio android-development android-app firebase-realtime-database

firebase-authentication's Introduction

Android-Firebase Authentication Demo App

firebase-logo

Firebase for Android basic Sign Up

firebase_signup

auth 2 registered user

Basic useful feature list:

  • Allow user to sign up to the application
  • The user's information is dispalyed via Firebase Auth

Dependencies Used in the App

 compile 'com.google.firebase:firebase-auth:10.0.1'

Apply this plugin to the build.gradle(Module:app) after dependnecies

apply plugin: 'com.google.gms.google-services'

In your build.gradle(Project:FirebaseAuthDemo) or Poject folder add this classpath in the dependencies

 classpath 'com.google.gms:google-services:3.0.0'

Permissions used in the App

Add this permission in you AndroidManifest.xml file

 <uses-permission android:name="android.permission.INTERNET"/>

In order to use Firebase you will need to initialize the firebase auth object. In your MainActivity

FirebaseAuth firebaseAuth;

Next in your onCreate method you will create the object for firebase.

 firebaseAuth = FirebaseAuth.getInstance();

You will need to create method for the firebaseAuth creatUserWithEmailAndPassword()

     firebaseAuth.createUserWithEmailAndPassword(email, password)
                .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
                    @Override
                    public void onComplete(@NonNull Task<AuthResult> task) {
                        //checking if success
                        if(task.isSuccessful()){
                            //display some message here
                            Toast.makeText(MainActivity.this,"Successfully registered",Toast.LENGTH_LONG).show();
                        }else{
                            //display some message here
                            Toast.makeText(MainActivity.this,"Registration Error",Toast.LENGTH_LONG).show();
                        }
                        progressDialog.dismiss();
                    }
                });

Additional information available via Firebase website firebase-android

firebase-authentication's People

Contributors

7rajatgupta avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.