Add Login, Registration, ... to your React & NextJS App!

Overview

Add Login, Registration, ... to your React & NextJS App!

This repository contains an example which adds login, registration, account recovery (password reset), account verification (email verification), social sign in, multi-factor authentication to your NextJS app with just a few lines of code, using the open source Ory Kratos project!

For more details on how to do everything from scratch, please check out the accompanying blog post: Add Authentication to your Next.js / React Single Page Application (SPA)

Check this app out live at kratos-nextjs-react-example.vercel.app.

You might also like...
Quoter - Simple Quote generator APP made with NextJS
Quoter - Simple Quote generator APP made with NextJS

QuoterApp ( Estudo) A simple Quote Generator made with ReacJS using NextJS libra

Create-t3-app - Interactive CLI to quickly set up an opinionated, full stack, typesafe NextJS project using the T3 Stack
Create-t3-app - Interactive CLI to quickly set up an opinionated, full stack, typesafe NextJS project using the T3 Stack

create-t3-app Interactive CLI to quickly set up an opinionated, full stack, typesafe NextJS project using the T3 Stack Usage npm npx [email protected]

A NextJS, Tailwind, TRPC, Prisma, and NextAuth Starter Project that makes getting an app up and running as easy as possible

A NextJS, Tailwind, TRPC, Prisma, and NextAuth Starter Project that makes getting an app up and running as easy as possible

nextjs kafka web app to consume events in real-time using web sockets

Supernova Generic, simple kafka web client app. Display/consume kafka events in real-time using web sockets run locally git clone https://github.com/h

Startup-Landing - Collection of free top of the line startup landing templates built using react/nextjs/gatsby
Startup-Landing - Collection of free top of the line startup landing templates built using react/nextjs/gatsby

Collection of free top of the line startup landing templates built using react/nextjs/gatsby. Free to download, simply edit and deploy! Updated weekly!

my portfolio website using React/Nextjs and tailwind

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

✏React & Nextjs & TypeScript Study

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

NextJS version of Material Dashboard React
NextJS version of Material Dashboard React

Material Dashboard React NextJS Material Dashboard is a free Material-UI, NextJS and React Admin with a fresh, new design inspired by Google's Materia

React - NextJs + Tailwindcss+ PWA: JSON Visualizer to turn raw and chunky JSON into Visual good-looking data groups
React - NextJs + Tailwindcss+ PWA: JSON Visualizer to turn raw and chunky JSON into Visual good-looking data groups

React - NextJs + Tailwindcss+ PWA: JSON Visualizer to turn raw and chunky JSON into Visual good-looking data groups

Comments
  • bug: Demo Deploy broken

    bug: Demo Deploy broken

    The demo deploy from the blogpost is broken: https://kratos-nextjs-react-example.vercel.app/api/.ory/self-service/login/browser

    {
      "error": {
        "code": 404,
        "status": "Not Found",
        "request": "edf10ca6-4b9c-4454-909b-d78205925863",
        "reason": "The requested Ory Cloud Project does not exist. Please ensure your custom domain or Ory Cloud Project Slug are correct.",
        "message": "project not found"
      }
    }
    

    https://kratos-nextjs-react-example.vercel.app/ https://www.ory.sh/login-spa-react-nextjs-authentication-example-api-open-source/

    Blogpost tutorial seems to be broken as well. Could be related to the sdk change or something changed with the playground project.

    Investigating if there is an easy fix for the blogpost tutorial.

    opened by vinckr 0
  • Implement an example context and hooks.

    Implement an example context and hooks.

    While the example is useful for getting started with Ory out of the box, it's isn't a very friendly approach for large sites. Most react authentication libraries use a combination of Providers/Context to store the client to the authentication library and hooks to share the data to components.

    https://github.com/authts/react-oidc-context provides an example of a more typical react authentication provider.

    The advantages to this you only initialize the SDK once and share it across you entire app, without needing a useEffect on every page. based on my remedial understanding of the libraries, the following would be nice to have.

    components

    • <OryIdentityProvider OrySdkUrl=""> - initializes SDK
    • <RequireMinAAL aal="aal2" onAALInsufficient={() => { console.log("We should probably prompt the user to elevate")}> - checks users AAL, prevents rendering of child elements and instead allow developers to automate some user defined action when AAL is insufficient maybe showing an elevation dialog

    hooks

    • useSession - get the current session
    • useIdentity - get the current identity
    • useLogoutUrl - get the logout url
    opened by dopry 3
Owner
Ory
Join the Ory Summit - https://www.ory.sh/summit21 / Open Source Identity Platform For Everyone
Ory
Project with login screen, registration and Dashboard, using MySQL and API'S

Project with login screen, registration and Dashboard, using MySQL and API'S

Hugo Nunes 4 Dec 30, 2022
I have created a Login page type of app using react.js

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 1 Dec 28, 2021
Nextjs-chakra-navigation-example - NextJS with chakra-ui responsive nav example

nextjs-chakra-navigation-example I looked at how to implement navigation in next

Sandy Marko Knauer 1 Sep 6, 2022
ReservoirKit is a react package that makes it easy to add buying NFTs into your dApp. It's intuitive, responsive and customizable.

ReservoirKit is a react package that makes it easy to add buying NFTs into your dApp. It's intuitive, responsive and customizable.

Reservoir Protocol 34 Dec 26, 2022
Simple react web3 login for dapp

Simple react web3 login for dapp

Danilo Assis 16 Nov 13, 2022
A simple user login authentication with React and Firebase

User Login Authentication A simple user login authentication with React and Firebase. Technologies used React, Styled Components, TypeScript, Firebase

Dev King 1 Mar 14, 2022
A sample project for login and singup using React.js

Login & Registration Example Introduction This application is an example of a registration and login system that I made with different dependencies of

Mobile Expert 2 Mar 29, 2022
Node.js / GraphQL project template pre-configured with TypeScript, PostgreSQL, login flow, transactional emails, unit tests, CI/CD workflow.

Node.js API Starter Kit Node.js API Starter Kit is a project template for building Node.js backend applications optimized for serverless infrastructur

Kriasoft 119 Dec 30, 2022
Todo app built with react that helps users to add, delete and edit to-do lists

Todo app built with react that helps users to add, delete and edit to-do lists

Tarikwa Tesfa 7 Jun 3, 2022
Start your development with a Free Tailwind CSS and NextJS UI Kit and Admin.

Notus NextJS A beautiful UI Kit and Admin for Tailwind CSS and NextJS. Start your development with a Free Tailwind CSS and NextJS UI Kit and Admin. Le

Creative Tim 827 Dec 31, 2022