Skip to content

Social authentication with Passport and Node.js for Twitter, LinkedIn, and GitHub.

Notifications You must be signed in to change notification settings

dinushchathurya/passport-social-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Passport Social Auth

In here, I have created social authentication with Passport and Node.js. In this application, I have only implemented Twitter, LinkedIn and GitHub Authentications.

Requirements

  • Node.js

Credentials

  • LinkedIn

Navigate to LinkedIn Developers to register a new application. Just enter dummy info, make sure to add the callback - http://127.0.0.1:3000/auth/linkedin/callback - and update the config within the app:

  • Twitter

Navigate to Twitter Developer Page and create an new app, adding in the correct callback URL, and add the given client ID and Secret Key to the _config.js file

  • GitHub

Navigate to GitHub Developer Settings and create an new app, adding in the correct callback URL, and add the given client ID and Secret Key to the _config.js file

Run this Application

To run this application,

  • clone this repository git clone https://github.com/dinushchathurya/passport-social-auth

  • Then cd passport-social-auth

  • Run npm install

  • Then goto "_config test.js" file and rename it as "_config.js"

  • Paste your IDs in _config.js

  • Then run nodemon app.js

  • Then visit "http://localhost:3000"

Contact

For further more clarifications or regarding any issues, please contact me via my E-Mail.

License

Copyright (c) 2020 Dinush Chathurya and codingtricks.io

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Blog

https://codingtricks.io/

Happy Coding