Giter Site home page Giter Site logo

teamhanko / hanko-nextjs-starter Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 3.0 137 KB

Next.js App Router example showcasing Hanko integration for authentication and user management.

Home Page: https://hanko-nextjs-starter-six.vercel.app

License: MIT License

CSS 0.64% TypeScript 97.47% JavaScript 1.89%
auth nextjs nextjs13 nextjs14

hanko-nextjs-starter's Introduction

Hanko Next.js Starter (App router)

This repo demonstrates how to integrate Hanko with Next.js App router for authentication and user management.

Hanko is an open-source authentication and user management solution with a focus on moving the login beyond passwords while being 100% deployable today.

  • Built for passkeys as introduced by Apple, Google, and Microsoft
  • Fast integration with Hanko Elements web components (login box and user profile)
  • API-first, small footprint, cloud-native

Prerequisites

Before you begin, ensure you have the following:

  • Node.js installed (version 20.0.0 or later)
  • Hanko API URL from Hanko Cloud

Note: You'll need to create a Authentication Project on Hanko Cloud with the App URL http://localhost:3000. See our docs to learn how to setup a auth project.

Getting started

  1. Clone the repository
git clone https://github.com/teamhanko/hanko-nextjs-starter.git
  1. Set up environment variables

    • Create a .env file in the root directory and add the following environment variables:
    NEXT_PUBLIC_HANKO_API_URL=your-hanko-api-url
    • Replace your-hanko-api-url with your actual Hanko API URL.
  2. Install the dependencies using your preferred package manager (e.g., npm, pnpm, yarn, or bun). For this project, we've used pnpm:

pnpm install
  1. Start the development server:
pnpm dev

Usage

  1. Start the application:

    • Access the application by navigating to http://localhost:3000 in your web browser.
  2. Navigate to login page and experience Hanko Authentication.

Support

Feel free to reach out to us on Discord if you get into any issues.

License

This project is licensed under the MIT License.

hanko-nextjs-starter's People

Contributors

ashutosh-bhadauriya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.