Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 1.49 KB

File metadata and controls

42 lines (28 loc) · 1.49 KB

This project was set up using create-react-app. All client side code resides in the /src folder. You can find the code for the GraphQL API inside the /api directory.

Articles of this series

Preparing a GraphQL server for authentication

Password-based authentication with GraphQL and Passport

Facebook login with GraphQL and Passport

Building the React frontend

3 ways for authorization with GraphQL and Apollo

Authorization with GraphQL and custom directives

How to install and run the project

To install and start the app run following commands.

npm install
npm start

Visit http://localhost:4000/auth/facebook. You will be redirected to the Facebook login page. After you logged in you will be redirected to the Apollo playground at http://localhost:4000/graphql. You can then run the current user query to fetch your Facebook profile's data.

query {
  currentUser {
    id
    firstName
    lastName
    email
  }
}

mutation {
  logout
}