Skip to content
This repository has been archived by the owner on Dec 15, 2019. It is now read-only.

Fail to login with Google #77

Open
tkdchen opened this issue Mar 13, 2015 · 1 comment
Open

Fail to login with Google #77

tkdchen opened this issue Mar 13, 2015 · 1 comment
Labels

Comments

@tkdchen
Copy link
Contributor

tkdchen commented Mar 13, 2015

I run Cantas on develop branch from nodejs in my development environment. When click "Log in with Google", error occurs.

500 Error: Unknown authentication strategy "google"

    at attempt (/home/cqi/projects/nodejs-cantas/node_modules/passport/lib/middleware/authenticate.js:166:37)
    at authenticate (/home/cqi/projects/nodejs-cantas/node_modules/passport/lib/middleware/authenticate.js:342:7)
    at callbacks (/home/cqi/projects/nodejs-cantas/node_modules/express/lib/router/index.js:272:11)
    at param (/home/cqi/projects/nodejs-cantas/node_modules/express/lib/router/index.js:246:11)
    at pass (/home/cqi/projects/nodejs-cantas/node_modules/express/lib/router/index.js:253:5)
    at Router._dispatch (/home/cqi/projects/nodejs-cantas/node_modules/express/lib/router/index.js:280:5)
    at Object.Router.middleware [as handle] (/home/cqi/projects/nodejs-cantas/node_modules/express/lib/router/index.js:45:10)
    at next (/home/cqi/projects/nodejs-cantas/node_modules/express/node_modules/connect/lib/http.js:204:15)
    at SessionStrategy.strategy.pass (/home/cqi/projects/nodejs-cantas/node_modules/passport/lib/middleware/authenticate.js:318:9)
    at SessionStrategy.authenticate (/home/cqi/projects/nodejs-cantas/node_modules/passport/lib/strategies/session.js:67:10)
@tkdchen tkdchen added the bug label Mar 13, 2015
@tkdchen
Copy link
Contributor Author

tkdchen commented Mar 13, 2015

This is not a bug by inspecting the code due to the google section does not get configured well yet.

Why is "Unknown authentication strategy" error raised? CantasGoogleStrategy is only initialized when all Google authentication related configuration items are set properly. I didn't configure any of them, then the error occurs.

However, this problem is supposed to be improved from the usability aspect. When user does not enable the Google authentication, or there is any wrong or missed configuration, "Log in with Google" link should not appear in the login page. Thus, user can't be confused.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant