Skip to content

k-hemanth/OAuth-MERN-Stack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OAuth-MERN-Stack

Hello Guys,

Today we are going to see How to Login with Facebook?

I didn't add any styles to my components. Just a basic one.

First Step:

We need to register in FacebookApplication and copy AppID.

Paste in "client/public/index.html"

    window.fbAsyncInit = function () {
      FB.init({
        appId: '',//Paste your appId here 
        autoLogAppEvents: true,
        xfbml: true,
        version: 'v6.0'
      });

      // Broadcast an event when FB object is ready
      var fbInitEvent = new Event('FBObjectReady');
      document.dispatchEvent(fbInitEvent);
    };

To Run This App on Your Local Machine:

  • 1 Install node modules in client, server and root dir.(Skip to line 5 if you know how to install)
  • 2 Run from root npm install.
  • 3 Now cd client & npm install
  • 4 Now back to root folder and cd server & npm install
  • 5 Run npm start in root folder. Both clinet and server will start concurrently
Server will start at Port 5000
Clinet will start at Port 3000

On your first login it will say Welcome, {UserName} and from second time Welcome back {UserName}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published