hapi-auth-facebook

1.0.1 • Public • Published

hapi-auth-facebook so you can: img

Build Status codecov Code Climate dependencies Status devDependencies Status

👍 Easy Facebook Authentication for Hapi Apps

Facebook Hapi plugin with detailed documentation.

Why?

Facebook authentication is used everywhere! We wanted to create a reusable Hapi Plugin with readable code.

What?

A simple and easy Hapi plugin that gives you Facebook OAuth Authentication in a few steps.

If you're new to Hapi, check out: https://github.com/dwyl/learn-hapi

How?

Tutorial

A guide for how we built an app to login with facebook with no prior knowledge.

Step 1: Upgrade your personal Facebook account to a developer account

Go to developers.facebook.com/apps

upgrade-account

...after logging in to your facebook account, you can 'Register Now' for a developer account.

Step 2: Select what platform your app is on

makeapp

Step 3: Skip to create an App

On this page, you can click the button in the top right to quickly access your app's id.

skip

Step 4: Create App

Here you can specify your app's name (doesn't have to be unique!)

nameapp

Note: Copy the App ID and the Secret into your .env file.

Step 5: Specify Redirect URI

Inside the facebook app's advanced settings, specify the redirect URI near the bottom of the page:

redirecturi

Note: the redirect URI has to be an absolute URI - make sure you include the http:// prefix.

Step 6: Make a request in your Hapi server

In your hapi server, make a request to the following url specifying your individual app-id and redirect-uri

facebookRequest

Package Sidebar

Install

npm i hapi-auth-facebook

Weekly Downloads

1

Version

1.0.1

License

GPL-2.0

Last publish

Collaborators

  • des-des
  • hdrdavies
  • jackcarlisle
  • nelsonic