Git Product home page Git Product logo

facebook-oauth-without-passportjs's Introduction

Facebook Authentication

An app to authenticate users using their Github account and save information on SQlite using Prisma ORM

NGrok Settings

  • For your app to receive the token back from Facebook after the authentication you will need a valid URL. I recommend using NGrok https://ngrok.com/.
  • Just download it and execute it like this on your terminal
    • On Mac, you would execute the following command to run ngrok on your port 4000:
      ./ngrok http 4000
    
  • Copy the HTTPS url generated and replace the existing ngrok URL in your .env file under FACEBOOK_CALLBACK_URL, but leave the /facebook/callback

Facebook Settings

  • Create a Facebook Developer Account
  • Go to https://developers.facebook.com/apps and click to "Create App"
  • Select "Consumer" as the type of the App.
  • Fill out the form with name for the app and contact email.
  • On the new page that was loaded, on the Facebook Login card, click on "Set Up"
  • Select "Web"
  • On your site URL, add your ngrok URL
  • On the left panel, click on Settings -> Basic
  • Copy your ngrok URL to the field App Domains
  • In the "Privacy Policy URL" and "User Data Deletion" fields, add any site on web for this example
  • On your left panel, you should see a section Facebook Login. Click there and then in Settings
  • Copy your callback url from .env to the field "Valid OAuth Redirect URIs"

Installation

yarn

Prisma Configuration

The file data/prisma/schema.prisma is the place where you should define your all your table schemas

Create your tables using Prisma

Before running your app execute the following terminal command to generate your tables on SQLite.

yarn prisma migrate dev

This should be done regardless of the DB you are using.

Running the Application

yarn dev

Routes

facebook-oauth-without-passportjs's People

Contributors

anderson-0 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.