Using passport, with the facebook strategy, we authenticate users.
-
Visit facebook. Register a developer account with facebook and make an application.
-
In the project, create
server/constants/secrets.js
. Within that file, export two constants:CLIENT_ID
, which is your app's App ID, andCLIENT_SECRET
, which is your app's App Secret. -
Add
local.me
to the App Domains andhttp://local.me:3000
as a website to the Platforms. After entering this information, hitSave Changes
at the bottom right. -
Add
127.0.0.1 local.me
to the bottom ofetc/hosts
.
> npm run dev
Open up a browser and visit http://local.me:3000/login/facebook
. After you're authorized the application, you should see your access_token
in the url.