Git Product home page Git Product logo

next-sanity-facebook-auth's Introduction

next-sanity-facebook-auth

Minimal working example, showcasing 3rd party authentication through Facebook, between a next.js frontend and a Sanity backend.

Usage

Run npm install in all three subfolders: /api, /auth and /www. Then make sure to add necessary info in /api/.env, /auth/.env and /www/.env. To run the project:

cd api/
npm run dev

cd ../www/
npm run dev

cd ../auth/
npm run dev

Then you need to set permissions for the documents. In the /api folder, run node permissions/index.js.

Caveats

This is my first time working with oath, cookies and implementing an authentication flow. So if you see errors, security issues etc. I would love to get some feedback so this can be corrected. Mail/issues/pull requests/whatever.

There is also no error handling in this sample code (wanted to have the example as concise as possible), so this should also be added if you are using this.

next-sanity-facebook-auth's People

Contributors

eivindml avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

next-sanity-facebook-auth's Issues

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.