React-Hono example app showcasing Hanko integration for authentication and user management.
MIT License
This repo demonstrates how to integrate Hanko with React application for authentication and user management. It includes an Hono.js backend for JWT verification and middleware for securing pages under authentication.
Hanko is an open-source authentication and user management solution with a focus on moving the login beyond passwords while being 100% deployable today.
Before you begin, ensure you have the following:
Note: You'll need to create a Authentication Project on Hanko Cloud with the App URL
http://localhost:5173
. See our docs to learn how to setup a auth project.
git clone https://github.com/teamhanko/hanko-hono-react-starter.git
cd hanko-react-frontend
.env
file in the frontend directory (hanko-react-frontend
) and add the following environment variable:VITE_HANKO_API_URL=your-hanko-api-url
npm
, pnpm
, yarn
, or bun
). For this project, we've used pnpm
:pnpm install
pnpm dev
cd hono-server
.env
file in the backend directory (hono-server
) and add the following environment variable:HANKO_API_URL=your-hanko-api-url
pnpm install
pnpm dev
Start the application:
http://localhost:5173
in your web browser.Navigate to login page and experience Hanko Authentication.
Feel free to reach out to us on Discord if you get into any issues.
This project is licensed under the MIT License.