Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justsml/oauth-code-along
Express, OAuth, Passport example project & live code-along.
https://github.com/justsml/oauth-code-along
express oauth2 passport passport-jwt passportjs
Last synced: 2 months ago
JSON representation
Express, OAuth, Passport example project & live code-along.
- Host: GitHub
- URL: https://github.com/justsml/oauth-code-along
- Owner: justsml
- Created: 2018-02-28T21:56:14.000Z (almost 7 years ago)
- Default Branch: solution
- Last Pushed: 2022-12-07T14:34:53.000Z (about 2 years ago)
- Last Synced: 2024-10-11T23:25:15.306Z (3 months ago)
- Topics: express, oauth2, passport, passport-jwt, passportjs
- Language: JavaScript
- Homepage:
- Size: 151 KB
- Stars: 5
- Watchers: 2
- Forks: 12
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OAuth Code Along
> Links provided to setup OAuth keys in Objectives Section.
### Lessons / Videos
* Part 1: https://youtu.be/uPLEy92Njhc
* [End of lesson commit](https://github.com/justsml/oauth-code-along/commit/344a83101e2297388c886dec00c935db574d1ef3)
* Part 2: https://youtu.be/L-xSrBekKdk### Objectives
* Define OAuth, Passport, Session
* OAuth: Method for authenticating users w/ 3rd party providers
* Passport: Auth for express
* Session: Place to store user info - on the server
* Research & Draw OAuth Diagram
* Setup Keys for one of: [Twitter](https://apps.twitter.com/app/new), [Github](https://github.com/settings/applications/new), [Facebook](https://developers.facebook.com/apps/), [Google](https://console.cloud.google.com/projectcreate).
* Setup [express bits](https://github.com/justsml/guides/blob/master/express/app.js)
* Run `npm install express express-session body-parser morgan cors passport passport-github passport-twitter`
* Setup Passport & routes
* Profit!#### Part 2
> Review code from part 1
> Then Make it do The Thing™* Describe at least 4 critical parts of an Express+Passport app
* 3 minutes to review code
* Write short notes on slates/desks.
* serialize/deserialize
* in memory data for `users`
* Authorization - restricting routes
* Passport startegy & middleware
* Passport routes & callback* Why is session critical?
* Turn & talk
* Describe in own words issue w/ session (and fix it)
* Turn & talk### References/Resources
1. [Dan's Express App Template](https://github.com/justsml/guides/blob/master/express/app.js)
1. [Social auth snippets](https://tkssharma.com/authentication-using-passport-social-auth-with-nodejs/)