Learn how to authenticate a Strawberry Shake GraphQL client against a GraphQL API via Firebase Authentication.
In this video, I show how to automatically send an access token to a GraphQL API in order to execute a restricted mutation. I also integrate our Strawberry Shake client application with Firebase Authentication, store access tokens for logged in users, and add a login script for the user to log in before hitting the mutation that requires authentication.
In this series, I demonstrate how to build a GraphQL client in .NET with the Strawberry Shake NuGet package. GraphQL is a query language used for APIs that ultimately simplifies client development. Client applications only need to hit a single endpoint (usually "/graphql") in order to query the EXACT data that they need. With the right tools (such as Strawberry Shake) and knowledge, client-side GraphQL development is simple. The goal of this series is to show just how simple client-side GraphQL development can be with Strawberry Shake!
TIMESTAMPS:
0:00 - Introduction
0:53 - Automatically Sending an Access Token
2:36 - Executing Mutation without Access Token
5:37 - Getting an Access Token
6:40 - Executing Mutation with Access Token
7:13 - Authenticating Users with Firebase
9:42 - Storing the Firebase Access Token
11:04 - Using the Stored Access Token
14:32 - Testing Full Login Flow
15:20 - Summary
FIREBASE AUTHENTICATION APIS: https://firebase.google.com/docs/refe...
STRAWBERRY SHAKE DOCS: https://chillicream.com/docs/strawber...
SOURCE CODE: https://github.com/SingletonSean/grap...
OTHER LINKS:
Become a Member: / @singletonsean
Donations: https://www.paypal.com/biz/fund?id=UB...