Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

delia-m/facebook-login-example-bothside

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

facebook-login-example-bothside

The purpose of his example is to get access token with login facebook

Install

$npm install

Run

$npm start

check server

http://localhost:3000/

This example using :

  1. facebook js sdk
  2. passport and passport-facebook
you need app id and app secret of facebook
  1. Client side auth
  window.fbAsyncInit = function() {
    FB.init({
      appId      : 'Enter your consumer key here',
      xfbml      : true,
      version    : 'v2.5'
    });
  };
  1. Server side auth
    facebook: {
        clientId: 'Enter your consumer key here'
      , clientSecret: 'Enter your consumer secret here'
      , callbackURL: 'Enter your callbackURL here'
      , profileFields: ['id', 'displayName', 'photos', 'email'] /* user informations to get */
      /* Set the authType option to rerequest when authenticating. */
			, options: { authType: 'rerequest', scope: ['email', 'ads_management', 'ads_read'] } /* permissions */
    }
  1. Check user information of session - via [connect-ensure-login]

About

facebook-login-example-bothside

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published