gcinar75 / auth-with-remix-talk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

In this talk, we'll get a live coded demo of building custom hand-rolled authentication. When you have the right tools (and we do), authentication can be quite simple and secure. This is more (and better) than just: "Install this library and you're good to go." When we're done we'll have our own auth code that can evolve with our ever-changing requirements without a need to learn some library-specific APIs. We'll be leveraging the Web Platform the way it was meant to be done to give us simple and secure server-side authentication for the web.


Build Status GPL 3.0 License Code of Conduct

Prerequisites

System Requirements

  • git v2.13 or greater
  • NodeJS 14 || 16 || 18
  • npm v8 or greater

All of these must be available in your PATH. To verify things are set up properly, you can run this:

git --version
node --version
npm --version

If you have trouble with any of these, learn more about the PATH environment variable and how to fix it here for windows or mac/linux.

Setup

Follow these steps to get this set up:

git clone https://github.com/kentcdodds/auth-with-remix-talk.git
cd auth-with-remix-talk
npm run setup

This will take some time. This repository has many projects in it that each need to have their own database setup. We also run type checking and the build to make sure things are ready to rock and roll ๐Ÿค˜

If you experience errors here, please open an issue with as many details as you can offer.

Running each app

Each directory in the apps directory is a Remix app. The easiest way to run these without having to cd into each directory is to use the dev.js script in the root of this repository:

# to run the first app:
node dev 1

Each will run on a unique port so you can run multiple apps at once.

Alternatively, rather than opening this whole repo in an editor window, you open each exercise folder in an individual editor window (this will make things like โŒ˜+P more useful).

Playground

The playground allows you to quickly change between the different apps via the advance script:

# To set the playground to the 4th app:
node advance 4

Then to run the app, run:

# starts the playground in dev mode
node play

Instructions

For each exercise, follow the instructions in the README.md file of the exercise directory to learn what the objectives are.

You can us the diff.js script to be shown the differences between what's in any of the apps. For example:

# to be shown the differences between the fifth app and the sixth:
node diff 5 6

This can be handy for you to run when you think you're done but things aren't quite working as you expect.

About

License:Other


Languages

Language:TypeScript 60.8%Language:CSS 35.7%Language:JavaScript 3.2%Language:Shell 0.3%