Git Product home page Git Product logo

clementinejs-fcc's People

Contributors

biganth avatar johnstonbl01 avatar magikid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

clementinejs-fcc's Issues

npm install needed

For beginner users, you might want to document that after the repo is cloned, they have to run 'npm install'.

What's left to do?

Congratulations on a well-put-together project. I just did a quick trial install on Cloud 9, it likes libkrb5-dev for Passport and it needs to be told to start mongod and use port 8080 but other than that, it was pretty smooth. Are there any outstanding tasks you wish people would work on in order to get it ready for wider use?

Edit: note, this was with Node 4.0.0, installed via nvm.

Use $http instead of $resource to integrate Angular in Tutorial #3

I tried to write Tutorial #3 over my Tutorial #2 code, integrating AngularJS with Mongoose and Passport. I think I've solved the issue, but to help others avoid the pit I fell into, I spent Christmas Eve bashing my head as to why the code written for Tutorial #2, $resource("/api/clicks") wasn't working in Tutorial #3 as $resource("/api/:id/clicks").

In clickController.client.js, $resource("/api/:id", {id: "@id"}) worked for the $scope.getClicks() function, but in userController.client.js and the other $scope functions, I received the error "http://gbhojraj.c9.io/api/clicks not found". The :id field disappeared in the request URL.

I'm not sure why $resource was able to access the data in $scope.getClicks() and not in POST or any other scopes, but rewriting the code with $http.get("/api/:id").then(function(result){...}; works!

Mongoose deprecation issue

Server.js section in Clementine.js Passport Authentication Tutorial

the directions if followed gives me a deprecation warning if using following code. mongoose.connect('mongodb://localhost:27017/clementinejs');

changing code to following solves this issue.
mongoose.connect('mongodb://localhost:27017/clementinejs', {useMongooseClient: true});

clementinejs-fcc running on heroku

I've run into a problem with mongoose. Apparently it currently doesn't support Mongodb 3.0. when I loaded clementine to heroku it requires a setup of the Mongolab add-in. Mongolab is supporting only 3.0. When you login using the mongo you will get an authentication error because its gone to a SCRAM-SHA-1 authentication. I'm not sure what the solution to all this will be, but I have a feeling the mongoose api will be different.

Update User Controller to Account for No GitHub DisplayName

Some GitHub users have not set a display name in their profiles. In this case, the /login page should display the username rather than the display name.

I'm happy to walk a beginner making his or her first pull request through making this change.

Authentication error

Hi, any suggestions?

AuthorizationError: The redirect_uri MUST match the registered callback URL for this application.
   at Strategy.OAuth2Strategy.authenticate (/home/ubuntu/workspace/node_modules/passport-github/node_modules/passport-oauth2/lib/strategy.js:126:25)
   at attempt (/home/ubuntu/workspace/node_modules/passport/lib/middleware/authenticate.js:348:16)
   at authenticate (/home/ubuntu/workspace/node_modules/passport/lib/middleware/authenticate.js:349:7)
   at Layer.handle [as handle_request] (/home/ubuntu/workspace/node_modules/express/lib/router/layer.js:95:5)
   at next (/home/ubuntu/workspace/node_modules/express/lib/router/route.js:131:13)
   at Route.dispatch (/home/ubuntu/workspace/node_modules/express/lib/router/route.js:112:3)
   at Layer.handle [as handle_request] (/home/ubuntu/workspace/node_modules/express/lib/router/layer.js:95:5)
   at /home/ubuntu/workspace/node_modules/express/lib/router/index.js:277:22
   at Function.process_params (/home/ubuntu/workspace/node_modules/express/lib/router/index.js:330:12)
   at next (/home/ubuntu/workspace/node_modules/express/lib/router/index.js:271:10)
   at SessionStrategy.strategy.pass (/home/ubuntu/workspace/node_modules/passport/lib/middleware/authenticate.js:325:9)
   at SessionStrategy.authenticate (/home/ubuntu/workspace/node_modules/passport/lib/strategies/session.js:71:10)
   at attempt (/home/ubuntu/workspace/node_modules/passport/lib/middleware/authenticate.js:348:16)
   at authenticate (/home/ubuntu/workspace/node_modules/passport/lib/middleware/authenticate.js:349:7)
   at Layer.handle [as handle_request] (/home/ubuntu/workspace/node_modules/express/lib/router/layer.js:95:5)
   at trim_prefix (/home/ubuntu/workspace/node_modules/express/lib/router/index.js:312:13)

TokenError: The code passed is incorrect or expired.

I'm trying to log in to the app but I'm getting

TokenError: The code passed is incorrect or expired.
   at Strategy.OAuth2Strategy.parseErrorResponse (...\node_modules\passport-oauth2\lib\strategy.js:320:12)
   at Strategy.OAuth2Strategy._createOAuthError (...\node_modules\passport-oauth2\lib\strategy.js:367:16)
   at ...\node_modules\passport-oauth2\lib\strategy.js:166:45
   at ...\node_modules\passport-github\lib\strategy.js:77:16
   at ...\node_modules\oauth\lib\oauth2.js:195:7
   at passBackControl (...\node_modules\oauth\lib\oauth2.js:125:9)
   at IncomingMessage.<anonymous> (...\node_modules\oauth\lib\oauth2.js:143:7)
   at emitNone (events.js:85:20)
   at IncomingMessage.emit (events.js:179:7)
   at endReadableNT (_stream_readable.js:913:12)
   at _combinedTickCallback (internal/process/next_tick.js:74:11)
   at process._tickCallback (internal/process/next_tick.js:98:9)

Any ideas regarding this?

outdated instructions to setup GitHub Authentication

according to clemintine README.md file when downloading the boilerplate via command
git clone https://github.com/johnstonbl01/clementinejs-fcc.git your-project
I am to go to http://www.clementinejs.com/tutorials/tutorial-passport.html#GitHubAppSetup

Head to GitHub and log in.

  1. Click your profile picture in the top right corner and choose the ‘Settings’ option.
  2. On the left-hand side, click on ‘Applications’.
  3. At the top of the page, click on ‘Developer applications’.
  4. Click the ‘Register new application’ button.

Instruction should read instead!

  1. Click your profile picture in the top right corner and choose the ‘Settings’ option.
  2. Select OAuth Apps at the bottom left of the screen
  3. Top right of the screen select Register a new application
  4. Register new application button

fill out form cont...

Error: socket hang up , my OAuth don't seem to work

After going through the steps and running node server.js , it ran successfully but clicking the login button, this showed up

Error: socket hang up
    at Strategy.OAuth2Strategy._createOAuthError (/home/m4rhy0rh/workspace/project1/node_modules/passport-oauth2/lib/strategy.js:348:17)
    at /home/m4rhy0rh/workspace/project1/node_modules/passport-oauth2/lib/strategy.js:171:43
    at /home/m4rhy0rh/workspace/project1/node_modules/oauth/lib/oauth2.js:177:18
    at ClientRequest.<anonymous> (/home/m4rhy0rh/workspace/project1/node_modules/oauth/lib/oauth2.js:148:5)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at CleartextStream.socketErrorListener (http.js:1547:9)
    at CleartextStream.EventEmitter.emit (events.js:95:17)
    at SecurePair.<anonymous> (tls.js:1400:15)
    at SecurePair.EventEmitter.emit (events.js:95:17)
    at SecurePair.error (tls.js:1020:27)
    at EncryptedStream.CryptoStream._done (tls.js:705:22)
    at CleartextStream.read [as _read] (tls.js:496:24)
    at CleartextStream.Readable.read (_stream_readable.js:320:10)
    at EncryptedStream.onCryptoStreamFinish (tls.js:301:47)
    at EncryptedStream.g (events.js:180:16)
    at EncryptedStream.EventEmitter.emit (events.js:117:20)

Forgotten step

In order for the app to work you must create an app.use() statement in server.js and that is not covered in the fcc tutorial. Please update. Thanks for all your hard work on this. It has been very beneficial.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.