Posts

Showing posts from February, 2020

Blazor WebAssembly & Firebase Authentication

We are not using any nuget packages here. This is javascript web setup. For this to work you will need the following: 1. Firebase account 2. Auth Providers should be enabled in firebase console 3. A little knowledge of JSIterop 4. A little knowledge of Javascript along with your existing C# skills Step 1: Create a project in Firebase console Step 2: Go to firebase console -> Setting icon -> General tab -> scroll down to 'your apps' and find 'sdk snippets'. Now click on 'Config' radio button  and copy your firebaseConfig. It looks like this: const firebaseConfig = { apiKey: "", authDomain: "", databaseURL: "", projectId: "", storageBucket: "", messagingSenderId: "", appId: "" }; Step 3: In your blazor webAssemby project, go to wwroot and create a js file called firebase.js. Paste the following code. Not here I am caching firebase auth tokens. You don'...