Lessons

Explore all newline lessons

Tags
Author
Pricing
Sort By
Video
Most Recent
Most Popular
Highest Rated
Reset
Prevent Cross-Site Request Forgery Attacks With X-CSRF Token

lesson

Prevent Cross-Site Request Forgery Attacks With X-CSRF TokenTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL - Part Two

We’ll take an additional step in this lesson to prevent Cross-Site Request Forgery attacks. We'll see how we can have the client pass a CSRF token with every request and where the server can use the token to verify the identity of the viewer making the request.

How to Use a Viewer Cookie to Automatically Log In a User

lesson

How to Use a Viewer Cookie to Automatically Log In a UserTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL - Part Two

Our server is now able to help set and clear the "viewer" cookie in our client when we sign-in with Google. In this lesson, we'll modify our client such that it will use the "viewer" cookie to automatically log a viewer in when the app first renders and the cookie is available.

Using NPM cookie-parser to Read Cookies in React

lesson

Using NPM cookie-parser to Read Cookies in ReactTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL - Part Two

We'll utilize the `cookie-parser` package in our Node server to help parse a "viewer" cookie from HTTP requests sent from the client.

sessionStorage vs localStorage vs Cookies for Secure Storage

lesson

sessionStorage vs localStorage vs Cookies for Secure StorageTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL - Part Two

Before we dive into implementing persistent login sessions in our app, we'll touch on the different storage mechanisms of the web browser. In this lesson, we explore the differences between localStorage, sessionStorage, and cookies.

How to Store Persistent Google Sign-In Sessions With Cookies

lesson

How to Store Persistent Google Sign-In Sessions With CookiesTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL - Part Two

A browser cookie is data that a server can send to a user's web browser where the browser can often send back to the server. With this lesson, we begin discussing how persistent login sessions can be made with cookies by going through a simple exercise with the Google search web application.

How to Build a React Header With a React Log Out Mutation

lesson

How to Build a React Header With a React Log Out MutationTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL - Part Two

A user is now able to successfully sign-in from the Login page. In this lesson, we'll spend some time creating the AppHeader component that will help allow users to navigate around our app.

How to Query Google Sign-In Authentication URL From a Client

lesson

How to Query Google Sign-In Authentication URL From a ClientTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL - Part Two

Having the UI of the Login page built in our client, we'll investigate how we can make the query for Google Sign In's authentication URL when a user attempts to sign in.

How to Build a Custom Google Sign-In UI in React

lesson

How to Build a Custom Google Sign-In UI in ReactTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL - Part Two

We'll now switch over to work in our React application and have it communicate with the server to allow a user to sign-in via Google OAuth.

Build GraphQL Authentication Resolvers for Google Auth

lesson

Build GraphQL Authentication Resolvers for Google AuthTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL - Part Two

We'll continue to update the GraphQL resolver functions we've prepared to allow users to log-in & log-out of our application.

Using Google Auth and People API With React and GraphQL

lesson

Using Google Auth and People API With React and GraphQLTinyHouse: A Fullstack React Masterclass with TypeScript and GraphQL - Part Two

Before we update our GraphQL OAuth resolvers, we'll use Google's official Node.js library to help access and interact with Google APIs.