Giter Site home page Giter Site logo

geddy-passport's Introduction

Geddy

A simple, structured web framework for Node

Build Status Gitter

DEPRECATION NOTICE

Geddy is no longer actively maintained, and therefore it is not recommended to be used for any new projects. For current users, it is highly recommended to migrate another framework.

Install Geddy:

$ npm install -g geddy

Note: Make sure your installed node version is not v6 or higher, as Geddy will not function properly. This will be fixed in the, hopefully, soon future.

Consider using 'nvm' to help you manage your node versions.

Create an app, start it up:

$ geddy gen app my_app
$ cd my_app
$ geddy
Creating 1 worker process.
Server worker running in development on port 4000

Create a CRUD resource

$ geddy gen scaffold foobar baz:string qux:int
[Added] app/models/foobar.js
[Added] db/migrations/20130809201124_create_foobars.js
[Added] test/models/foobar.js
[Added] test/controllers/foobars.js
[Added] app/controllers/foobars.js
[Added] Resource foobars route added to config/router.js
[Added] View templates

Documentation

Docs are on the GeddyJS Website: http://geddyjs.org/documentation

Community Tutorials

Geddy.JS: A No-Brainer MVC Node.js Framework - Bhanu Pratap Chaudhary https://www.digitalocean.com/community/articles/geddy-js-a-no-brainer-mvc-node-js-framework

Community

License

Copyright 2017. Geddy - Web-app development framework

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


[email protected]

:octocat:

geddy-passport's People

Contributors

der-on avatar djensen47 avatar kengoldfarb avatar larzconwell avatar mde avatar phanect avatar tbjers avatar techwraith avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

geddy-passport's Issues

geddy gen auth --swig broken

To get it to work, I had to do the following:

  • clone geddy from source
  • vim ./gen/jakelib/auth.jake
  • disable geddy from uninstalling geddy-passport (comment lines 73/74 and add installPackages();
  • create the directory app/helpers/passport
  • cd lib/passport
  • cp *.js ../../app/helpers/passport
  • rename app/views_swig/users/_form.html.swig to app/views_swig/users/form.html.swig

Looks like some directories were re-arranged and not taken into account in the auth.jake, also the form files in all the template view folders need the _forms renamed.

TypeError: Property 'next' of object #<Context> is not a function

Using geddy v0.11.8.

Generated new app and run geddy auth. Updated secrets with twitter keys. Started the app.

Accessed http://localhost:4000/login and followed up to http://localhost:4000/auth/twitter

Receiving:

TypeError: Property 'next' of object #<Context> is not a function
at Context.actions.error (/home/hamster/tmp/x/node_modules/passport/lib/passport/context/http/actions.js:91:8)
at /home/hamster/tmp/x/node_modules/passport-twitter/node_modules/passport-oauth/lib/passport-oauth/strategies/oauth.js:196:30
at /home/hamster/tmp/x/node_modules/passport-twitter/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:518:17
at passBackControl (/home/hamster/tmp/x/node_modules/passport-twitter/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:374:13)
at IncomingMessage.<anonymous> (/home/hamster/tmp/x/node_modules/passport-twitter/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:386:9)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickDomainCallback (node.js:459:13)

Am I doing something wrong?

I tried with twitter only (removed others from secrets.json) and commented out

var SUPPORTED_SERVICES = [
  'twitter'
//, 'facebook'
//, 'yammer'
];

but still no luck.

TypeError: Cannot call method 'toLowerCase' of undefined

Hey guys,
followed the Tutorial for auth. Then i created a new Local user -> works.
Login in to this local user -> works.
Logging in with facebook -> works.
Tessting again to Login with the Local user returns the following error:

Error: 500 Internal Server Error
TypeError: Cannot call method 'toLowerCase' of undefined
at eval (eval at (/usr/lib/node_modules/geddy/node_modules/model/lib/adapters/memory/index.js:85:16), :2:28)
at utils.mixin.load (/usr/lib/node_modules/geddy/node_modules/model/lib/adapters/memory/index.js:110:13)
at Object.obj.all (/usr/lib/node_modules/geddy/node_modules/model/lib/index.js:391:25)
at Function.obj.first (/usr/lib/node_modules/geddy/node_modules/model/lib/index.js:348:18)
at actions.local (/var/www/geddy/leben/app/helpers/passport/actions.js:105:22)
at callback (/usr/lib/node_modules/geddy/lib/controller/base_controller.js:282:22)
at controller.BaseController._handleAction (/usr/lib/node_modules/geddy/lib/controller/base_controller.js:295:7)
at cb as callback
at async.Initializer.complete (/usr/lib/node_modules/geddy/node_modules/utilities/lib/async.js:286:10)
at /usr/lib/node_modules/geddy/lib/app/index.js:269:21

Errors not reported on the login page.

I noticed this while testing the Jade templates.

Try to login with an account that does not exist or with the wrong password. No errors are presented.

I can work on this after I finish the templates.

geddy gen auth failed

It said node_modules/geddy-passport/app/views/users/_form.html.ejs does not exists.

It seems that in the 1.0.1 version, form.html.ejs is renamed to _form.html.ejs but the gen auth script does not change.

Errors when using third party logins

When you click on the Log in With Twitter button, I get the following error

/home/larz/Desktop/omg/node_modules/passport/lib/passport/context/http/actions.js:91
  this.next(err);
       ^
TypeError: Property 'next' of object #<Context> is not a function
    at Context.actions.error (/home/larz/Desktop/omg/node_modules/passport/lib/passport/context/http/actions.js:91:8)
    at OAuthStrategy.authenticate (/home/larz/Desktop/omg/node_modules/passport-twitter/node_modules/passport-oauth/lib/passport-oauth/strategies/oauth.js:183:30)
    at exports.OAuth.getOAuthRequestToken (/home/larz/Desktop/omg/node_modules/passport-twitter/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:512:17)
    at passBackControl (/home/larz/Desktop/omg/node_modules/passport-twitter/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:368:13)
    at IncomingMessage.exports.OAuth._performSecureRequest.request.on.callbackCalled (/home/larz/Desktop/omg/node_modules/passport-twitter/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:380:9)
    at IncomingMessage.EventEmitter.emit (events.js:126:20)
    at IncomingMessage._emitEnd (http.js:366:10)
    at HTTPParser.parserOnMessageComplete [as onMessageComplete] (http.js:149:23)
    at CleartextStream.socketOnData [as ondata] (http.js:1447:20)
    at CleartextStream.CryptoStream._push (tls.js:544:27)

And when I click on Sign in With Facebook, I get the following:
image

unable to login with local user

Hi,
Facebook auth is working but I am unable to login with local users.
""
Error: Could not verify your login information.
""
I tried filesystem, memory and riak backends.

cryptPass is not being exported properly

Using a fairly "stock" implementation of geddy-passport (via issuing a geddy auth), I'm able to create a user but I'm unable to log in. For some reason, the cryptPass function isn't being exported from helpers/passport/index.js:

cryptPass = require('./index').cryptPass;

The full stack is below.

/Users/aashay/myapp/app/helpers/passport/actions.js:29
        crypted = cryptPass(password);
                  ^
TypeError: undefined is not a function
    at /Users/aashay/myapp/app/helpers/passport/actions.js:29:19
    at utils.mixin.load (/usr/local/lib/node_modules/geddy/node_modules/model/lib/adapters/mongo/index.js:215:11)
    at exports.Cursor.self.toArray (/Users/aashay/myapp/node_modules/mongodb-wrapper/lib/mongodb-wrapper.js:139:17)
    at Cursor.toArray (/Users/aashay/myapp/node_modules/mongodb-wrapper/node_modules/mongodb/lib/mongodb/cursor.js:129:9)
    at Cursor.each (/Users/aashay/myapp/node_modules/mongodb-wrapper/node_modules/mongodb/lib/mongodb/cursor.js:171:11)
    at Cursor.nextObject (/Users/aashay/myapp/node_modules/mongodb-wrapper/node_modules/mongodb/lib/mongodb/cursor.js:463:35)
    at Cursor.close (/Users/aashay/myapp/node_modules/mongodb-wrapper/node_modules/mongodb/lib/mongodb/cursor.js:682:5)
    at Cursor.nextObject (/Users/aashay/myapp/node_modules/mongodb-wrapper/node_modules/mongodb/lib/mongodb/cursor.js:463:17)
    at Cursor.each (/Users/aashay/myapp/node_modules/mongodb-wrapper/node_modules/mongodb/lib/mongodb/cursor.js:162:12)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)
[Sat, 10 Nov 2012 06:58:27 GMT] ERROR Worker 1600 died.

Error: Unknown task "gen:auth[default]"

Hi, on trying add Passport to new app, i have error:

$ geddy gen auth --trace
jake aborted.
Error: Unknown task "gen:auth[default]"
at TaskBase.nextPrereq (/usr/lib/node_modules/geddy/node_modules/jake/lib/task/task.js:167:19)
at TaskBase.runPrereqs (/usr/lib/node_modules/geddy/node_modules/jake/lib/task/task.js:118:12)
at TaskBase.invoke (/usr/lib/node_modules/geddy/node_modules/jake/lib/task/task.js:101:10)
at Program.run (/usr/lib/node_modules/geddy/node_modules/jake/lib/program.js:226:14)
at Cmd.runJake (/usr/lib/node_modules/geddy/lib/cmd.js:250:22)
at Cmd.run (/usr/lib/node_modules/geddy/lib/cmd.js:154:10)
at Object. (/usr/lib/node_modules/geddy/bin/cli.js:26:5)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)

Twitter auth isn't working

Set everything up fresh. Added my consumer key and secret from Twitter. Went to /login, clicked the Twitter icon, and just get this:

Error: 500 Internal Server Error

TypeError: Property 'next' of object # is not a function
at Context.actions.error (/Users/oscar/Dropbox/projects/piggybank/node_modules/passport/lib/passport/context/http/actions.js:91:8)
at /Users/oscar/Dropbox/projects/piggybank/node_modules/passport-twitter/node_modules/passport-oauth/lib/passport-oauth/strategies/oauth.js:196:30
at /Users/oscar/Dropbox/projects/piggybank/node_modules/passport-twitter/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:518:17
at passBackControl (/Users/oscar/Dropbox/projects/piggybank/node_modules/passport-twitter/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:374:13)
at IncomingMessage. (/Users/oscar/Dropbox/projects/piggybank/node_modules/passport-twitter/node_modules/passport-oauth/node_modules/oauth/lib/oauth.js:386:9)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:883:14
at process._tickDomainCallback (node.js:459:13)

Use bcrypt 0.8.x

Bcrypt 0.7.x has major compilation problems on various platforms

using with 'geddy gen auth' if get the 'no such file ..views_ejs/users/_form.html.ejs'

Creating file: /home/nodegod/projects/alma-club.com/app/controllers/auth.js
Creating file: /home/nodegod/projects/alma-club.com/app/controllers/main.js
Creating file: /home/nodegod/projects/alma-club.com/app/controllers/passports.js
Creating file: /home/nodegod/projects/alma-club.com/app/controllers/users.js
Creating file: /home/nodegod/projects/alma-club.com/app/helpers/passport/actions.js
Creating file: /home/nodegod/projects/alma-club.com/app/helpers/passport/index.js
Creating file: /home/nodegod/projects/alma-club.com/app/helpers/passport/strategies.js
Creating file: /home/nodegod/projects/alma-club.com/app/helpers/passport/user.js
Creating file: /home/nodegod/projects/alma-club.com/app/models/passport.js
Creating file: /home/nodegod/projects/alma-club.com/app/models/user.js
Creating file: /home/nodegod/projects/alma-club.com/app/views/main/index.html.ejs
Creating file: /home/nodegod/projects/alma-club.com/app/views/main/login.html.ejs
Creating file: /home/nodegod/projects/alma-club.com/app/views/main/logout.html.ejs
Creating file: /home/nodegod/projects/alma-club.com/app/views/users/_form.html.ejs
jake aborted.
Error: ENOENT, no such file or directory '/home/nodegod/projects/alma-club.com/node_modules/geddy-passport/app/views_ejs/users/_form.html.ejs'
at Object.fs.statSync (fs.js:684:18)
at _copyFile (/usr/lib/node_modules/geddy/node_modules/utilities/lib/file.js:66:19)
(See full trace by running task with --trace)

Cannot read property 'successRedirect' of undefined

I just setup geddy based on the guide. all i have generated are a book, and user scaffold. I then run geddy gen auth and all worked fine. But once I ran geddy to start the app, i get the below out put:

[Wed, 20 Aug 2014 05:12:08 GMT] INFO Creating 1 worker process.

/www/projects/shawn/newApp/app/helpers/passport/actions.js:4
  , successRedirect = config.successRedirect
                            ^
TypeError: Cannot read property 'successRedirect' of undefined
  at Object.<anonymous> (/www/projects/shawn/newApp/app/helpers/passport/actions.js:4:29)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/www/projects/shawn/newApp/app/helpers/passport/index.js:4:19)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/www/projects/shawn/newApp/app/controllers/auth.js:1:78)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at [object Object].module.exports.init (/usr/local/lib/node_modules/geddy/lib/init/controller.js:62:14)
  at initItem (/usr/local/lib/node_modules/geddy/lib/init/index.js:32:16)
  at doIt (/usr/local/lib/node_modules/geddy/lib/init/model.js:168:9)
  at done (/usr/local/lib/node_modules/geddy/lib/init/model.js:93:9)
  at [object Object].module.exports.loadAdapterForModel (/usr/local/lib/node_modules/geddy/lib/init/model.js:109:16)
  at doIt (/usr/local/lib/node_modules/geddy/lib/init/model.js:164:14)
  at done (/usr/local/lib/node_modules/geddy/lib/init/model.js:93:9)
  at [object Object].module.exports.loadAdapterForModel (/usr/local/lib/node_modules/geddy/lib/init/model.js:109:16)
  at doIt (/usr/local/lib/node_modules/geddy/lib/init/model.js:164:14)
  at done (/usr/local/lib/node_modules/geddy/lib/init/model.js:93:9)
  at /usr/local/lib/node_modules/geddy/lib/init/model.js:101:20
  at [object Object]._onTimeout (/usr/local/lib/node_modules/geddy/node_modules/model/lib/adapters/base_adapter.js:58:7)
  at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)

[Wed, 20 Aug 2014 05:12:09 GMT] ERROR Worker 41726 died.

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.