To inspect the code for the module, you can clone this repository and use git checkout to see the completed code for each lesson.
This Contains Authentication using OAuth2.0 for google and github.
We are able to access pieces of information on third party websites such as email contacts.
Secure authentication using third party apps.
- Granular Access Levels (Developers can see what data they need)
- Read/ Read + write access (If you want to post things to third party app you need write permissions)
Revoke Access (Third should be able to revoke access at any point on their website)
- Set up your App In their developer console and we get a client-id.
- Redirect to Authenticate
- Take them to the third party website to login
- User Grants permissions to your app
- Receive Authorisation Code from third party website
- Exchange AuthCode for Access Token (if you need subsequent info)
It creates the cookie and stores the user's identifications.
It crumbles the cookie and discover the user's identification.
Using passport - Simple, unobtrusive authentication for Node.js (http://www.passportjs.org/)
npm i passport passport-local passport-local-mongoose express-session
Website save some data from your previous session when you leave the site or get distracted. So that when you come next time it is saved already. Also these cookies show you to come back to the website and continue by showing ads and stuff on the other website that you use.
Visit (http://www.passportjs.org/packages/)
(http://www.passportjs.org/packages/passport-google-oauth2/)
npm install passport-google-oauth2
(http://www.passportjs.org/packages/passport-github2/)
npm install passport-github2
(https://www.passportjs.org/packages/passport-twitter/)
npm install passport-twitter