In this section, we're going to register and authenticate the user authentication is not a feature
exclusively handled by the front end, it's a shared responsibility between the front end and back end.
That's a problem.
Angular is a client side framework.
Every line of code we've written is meant to be run in the browser.
We haven't had to worry about the back end thanks to web pack.
We're able to deliver our app by a development server.
With that being said, it's not enough.
The server generated by a web pack can't perform other tasks.
It doesn't have the capabilities to authenticate users, handle file uploads or handle complex requests.
We're going to need something more powerful before jumping into authentication.
We will need to set up a server.
Unfortunately, we don't have the time to go over the concepts of back and development.
It's a field that requires dozens of hours to get into.
Our time is limited.
Luckily, there's a solution available for creating a server within five minutes.
The solution I'm referring to is called Firebase.
Firebase was initially introduced as a database.
Google acquired it a few years after its release.
As a result, the product has experienced a drastic transformation.
It's gone from a database to a suite of back end tools for mobile applications.
It doesn't have to be used for mobile apps.
You can also use it for web applications.
So what do I mean by back end solution?
Firebase will store your data, authenticate users, store files, provide analytics and much more.
We can completely avoid learning a new language for generating a web server.
Firebase is extremely popular.
Companies like Twitch, Alibaba and the New York Times use Firebase in some capacity.
In my opinion, it's a great solution for a quickly prototyping and application.
Firebase is more than suitable for powering our application, even though we will be using Firebase.
We will discuss how authentication works under the hood.
A basic understanding will suffice.
The first step to using Firebase is to create a new project.
It's completely free to create a project.
In the resource section of this lecture, I provide a link to Firebase.
You will need to log into your Google account to use Firebase at the top right corner.
Click the Go to console button.
You will be presented with the option to add a new project.
Click on it.
A pop up will appear asking for more information about our new project or going to call our project
clips.
Any name will do, but it should be relevant and it will be generated for our project.
We have the option of assigning a custom ID by clicking on the pencil icon for our case.
The auto generated ID will work fine.
Let's continue on to the next page.
You may be asked if you'd like to integrate Google Analytics into the project.
We're not going to use Google Analytics for this project.
However, you're more than welcome to enable it if you'd like.
I'm going to disable this option for this project.
There's not much configuration we have to perform out of the box.
The setup process is an absolute breeze.
We can tell Firebase to start creating the project.
This preparation may take a while for some of you.
Just be patient.
Once everything has been prepped, you can proceed to view your application right away.
We will be given a full fledged dashboard for managing our application.
It can be overwhelming, but I'll be sure to guide you through every relevant feature.
After creating the new application, we are going to turn on the database.
A database will allow us to store user and video information.
They're both critical pieces of information for our app on the sidebar.
There are various sections in our dashboard.
The most crucial section is called built.
This section contains a list of tools available for our project.
We will be spending the majority of our time under this section.
We're presented with two options for creating a database called Fire Store and Real Time Database.
Fire Store is Firebase Bases new database.
It's the better option.
It comes packed with more features and is scalable.
The real time database was the original solution the team came up with.
It's available for teams that prefer to work with the older version.
For this course, we will be using the Firestone database.
Click on this link.
We will be taken to a page with information on getting started with Fire Store.
There is a button that says Create database.
Click on it.
A model will appear to prompt us to select a set of security rules.
There are two sets called Production and Test Production Mode.
It will create a set of strict rules.
For example, only authorized users can read or write to the database.
This option is perfect for apps that are ready to ship to production.
We're currently in the development phase of the application, so the test mode will be the better option.
This mode will allow all users to read and write to our database.
It's not a secure option, but that's all right.
No one knows about our application besides us when we near the completion of our application.
We are going to revisit the rules.
The rules will be revised to be stricter than their current state select test mode and then click next.
After selecting a set of rules, we will be asked to select a location for our database.
This is an important option to consider.
Firebase offers locations all over the world.
I recommend picking a location that's close to you or your users.
The closer a database is, the faster the response time.
By default, Firebase will try to pick a location closest to you.
If you don't like the location, we have the opportunity to change it to a different location.
I prefer the default, so I'll leave it as is.
Click Enable.
Firebase will begin creating our database.
This process may take a few moments.
We've successfully created our database currently, the database is empty.
We will start adding data in a future section.
In the next lecture, we're going to review the rules generated by Firebase.