Coder Social home page Coder Social logo

tommyskott / nextjs-netlify-identity Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 246 KB

A simple component to handle authentication with Netlify Identity, in a Next.js project.

Home Page: https://nextjs-netlify-identity-login.netlify.app

License: MIT License

JavaScript 73.85% CSS 26.15%
netlify netlify-identity netlify-identity-widget nextjs react

nextjs-netlify-identity's Introduction

Next.js Netlify Identity

Netlify Status

A simple component to handle authentication with Netlify Identity, in a Next.js project. Using createContext, useEffect, useState in a globally wrapped component.

Important! You must deploy your site to Netlify and activate Identity, to make logging in and signing up work. You will need the Next.js plugin installed on your live site, to make Next.js work properly on Netlify. That plugin is developed by Netlify and gets installed automatically on deploy. If deploy fails, check the logs and your build settings, then try to re-deploy again without cache.

Demo site

Try the demo at: https://nextjs-netlify-identity-login.netlify.app

Getting Started

git clone [email protected]:tommyskott/nextjs-netlify-identity.git
cd nextjs-netlify-identity
npm i
npm run dev

Set the local dev url

When clicking the login button you will see the Netlify Identity Widget pop up. First time you will need to set your local development url: http://localhost:3000

Install Netlify cli globally

Make it easier to work locally with Netlify serverless functions, by using Netlify cli.

Install

npm install netlify-cli -g

The next two steps are not mandatory, but it's good to do.

Login to Netlify with the cli

ntl login

Link your local project to your live site

ntl link

When that's installed you can run this, instead of npm run dev:

ntl dev

This will give you a local environment that works with Netlify serverless functions on: http://localhost:8888

Reset your local dev url

When you're using ntl dev you need to clear your development URL in the Netlify Identity Widget pop up and set it to your live site name, e.g: https://nextjs-netlify-identity-login.netlify.app/

This is a Next.js project bootstrapped with create-next-app.

nextjs-netlify-identity's People

Contributors

tommyskott avatar

Watchers

 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.