Skip to content

A straightforward example of how to use Remix Auth TOTP in a Remix App.

Notifications You must be signed in to change notification settings

dev-xo/totp-starter-example

Repository files navigation

Welcome to Remix Auth TOTP - Starter Example

This repository has been created with the intent to provide a simple example of how to use Remix Auth TOTP. This example uses Prisma ORM and SQLite to store and handle the authentication flow.

Getting Started

  1. Clone the repository and install its dependencies:
npm install
  1. Run Prisma migrations:
npx prisma migrate dev --name init
  1. Get required .env variables:

In order to successfully implement remix-auth-totp you will require the following .env variables:

ENCRYPTION_SECRET=""
RESEND_API_KEY=""

Let's break down how to obtain these variables:

For ENCRYPTION_SECRET a random 64-character hexadecimal string is required. An example of a random 64-character hexadecimal string is 928F416BAFC49B969E62052F00450B6E974B03E86DC6984D1FA787B7EA533227.

For RESEND_API_KEY you can visit Resend and create a free account in order to get your API key here.

Note

Remember to replace the current .env.example file with your own .env file.

  1. Run the server:
npm run dev

And you're ready to go! 🎉

Contributing

If you want to share your own example, feel free to open a PR into the main repository.

About

A straightforward example of how to use Remix Auth TOTP in a Remix App.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published