Firebase Authentication – Using Google – Federated identity provider integration

Step 1: Create firebase account

Go to https://firebase.google.com and create a account

Step 2: Create new Project

Create new project by clicking ‘Add Project’ button from the dashboard. Fill all the details as mentioned in below image and proceed to create project.

Step 3: Enable Email and password based authentication

Go to Project Overview -> Develop tab -> Authentication -> Click on setup sign in method.

Check the Email/Password option from the sign-in providers tab

Enable Google Sign-in from dashboard

Step 4: Download firebase quick-start html file

Download all files from official github project: https://github.com/firebase/quickstart-js/tree/master/auth

Open google-popup.html and replace the config section from your project details which you can find Firebase Authentication -> web setup button as shown in image below.

Replace this line of code

<script src="/__/firebase/5.7.0/firebase-app.js"></script>
<script src="/__/firebase/5.7.0/firebase-auth.js"></script>
<script src="/__/firebase/init.js"></script>

To

<!-- Firebase App is always required and must be first -->
<script src="https://www.gstatic.com/firebasejs/5.8.4/firebase-app.js"></script>

<!-- Add additional services that you want to use -->
<script src="https://www.gstatic.com/firebasejs/5.8.4/firebase-auth.js"></script>

<script>
  var config = {
    // Your configuration data from your project as shown in image
  };
  firebase.initializeApp(config);
</script>

Step 5: Open the google-popup.html in web browser

You will get following window, where you can sign-in & sign-up using google

That’s all! You can integrate google firebase authentication into any of your website.

Sign in with Google

You can sign in using your google credential seamlessly.

Options Step 1: This app isn’t verified warning

Since this google login API is private, your account should be whitelisted to access and authenticate using in production website, use this link verify the app. https://support.google.com/cloud/answer/7454865?hl=en&ref_topic=3473162

Optional Step 2: Add your localhost or production website URL in dashboard

Go to Dashboard -> Authentication -> Sign in method -> (Scroll down) Authorised domains

User Management from Firebase Dashboard

You can manage all users of your website from the firebase dashboard itself, you can delete user, disable user and reset password for user from dashboard.

Dashboard -> Authentication -> users

Thanks, For any clarification please write in comment box below!

Firebase Authentication – Email and password based authentication

Step 1: Create firebase account

Go to https://firebase.google.com and create a account

Step 2: Create new Project

Create new project by clicking ‘Add Project’ button from the dashboard. Fill all the details as mentioned in below image and proceed to create project.

Step 3: Enable Email and password based authentication

Go to Project Overview -> Develop tab -> Authentication -> Click on setup sign in method.

Check the Email/Password option from the sign-in providers tab

Step 4: Download firebase quick-start html file

Download all files from official github project: https://github.com/firebase/quickstart-js/tree/master/auth

Open email-password.html and replace the config section from your project details which you can find Firebase Authentication -> web setup button as shown in image below.

Step 5: Open the email-password.html in web browser

You will get following window, where you can create new user using sign-up option, login existing user using sign-in option and you can do email verification & send password reset email.


That’s all! You can integrate google firebase authentication into any of your website.

Sign up

Sign Up

Sign in

You can sign in using credential you used for login seamlessly.

Email Verification

Click on send email verification will send email notification to the user. You can also customize the email content from the dashboard.

User Management from Firebase Dashboard

You can manage all users of your website from the firebase dashboard itself, you can delete user, disable user and reset password for user from dashboard.

Dashboard -> Authentication -> users

Thanks, For any clarification please write in comment box below!

C# 7.2 introduced new access modifier – ‘Private Protected’ – How it works?

Before Private Protected C# had 5 access modifier such as public, private, protected, internal, protected internal.

As per MSDN

Finally, a new compound access modifier: private protected indicates that a member may be accessed by containing class or derived classes that are declared in the same assembly. While protected internal allows access by derived classes or classes that are in the same assembly, private protected limits access to derived types declared in the same assembly.

This private protected new compound access modifier is used to overcome the limitation of protected internal. In private protected access modifier, the derived class from the different assembly cannot access the Methods, Fields and Properties.

Code Example

Protected Internal in C#

Private Protected in C# – New in C# 7.2

Please check the difference in line number 21 in both the above code.


All Access Modifiers in C#

public: Access is not restricted.

protected: Access is limited to the containing class or types derived from the containing class.

internal: Access is limited to the current assembly.

protected internal: Access is limited to the current assembly or types derived from the containing class.

private: Access is limited to the containing type.

private protected: Access is limited to the containing class or types derived from the containing class within the current assembly.