11:42Anonymous Authentication with Angular and Firebase - Lazy Registration
From the creator
https://angularfirebase.com/lessons/angular-firebase-authentication-tutorial-anonymous-auth/ In this episode were going to build an Anonymous Authorization service with Angular 4 and Firebase. This feature will allow a user to start using your app with going through the typical OAuth signin or Email Password registration process. This approach is also called lazy registration or gradual engagement. It works by creating a session using only a user ID (UID). If the user signs out without updating more account details, they will be unable to log back in. At this point, it is assumed you have the AngularFire2 package installed and bootstrapped into your app. If not, go to the docs or checkout this video. STEP 1 - Generate the Auth Service If starting from scratch, generate the Auth Service. I'm going to be building upon the auth service from my previous OAuth tutorial and I recommend checking that video out first. STEP 2 - Activate Providers in Firebase Head over to your firebase project and enable the anonymous provider. STEP 3 - Building the Service First, make sure to subscribe to the FirebaseAuthState in the constructor. Then, write a function to login the user with the Anonymous provider. Let's also add a TypeScript getter to see if a logged in user is anonymous. This will be useful when displaying content specifically for anonymous users. STEP 4 - Create a Component Now we can inject the service into our components to login users anonymously. In this case,
Published 2017-04-19 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





