Posts

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'...
I will talk about:- Architecture to choose for bigger audience. Too many machines - remove dependency from user machine (the unknowns) and shift it towards known machines (servers). Make the client as lean as possible. Get server to do the  heavy lifting - that's what they are made for. The problem is that unless you have an army of application support people, you would never be able to sort out each and every problem. Machines tend to be different. Code misbehaves on certain machines and let's face it, you can never full-proof your code for every kind of machine. On the face of it, it is quite lucrative to push as much functionality to our "thick" or "smart" client as possible. This will de-centralise processes to user's machine. Result - less load on server. But in case of a production issue, is hard of get hold of user's machine. Moreover, efforts done to fix the problem might not be useful to majority of users. This result in m...