stormpath / stormpath-passport-express-sample

A simple Stormpath Express sample app.
43 stars 33 forks source link

throw new Error('apiKey.id is required.'); #18

Open subatomicglue opened 7 years ago

subatomicglue commented 7 years ago

I am seeing this error:

> git clone git@github.com:stormpath/stormpath-passport-express-sample.git nodejs-stormpath-passport-express-sample
> cd nodejs-stormpath-passport-express-sample
> npm install
> export STORMPATH_CLIENT_APIKEY_ID=my key here
> export STORMPATH_CLIENT_APIKEY_SECRET=my secret key here
> export STORMPATH_APPLICATION_HREF=my http here
> # (i also have .env file with same vars)
> node app.js 

/Users/happyuser/src/TechStack-Research/nodejs-stormpath-passport-express-sample/node_modules/stormpath/lib/authc/RequestAuthenticator.js:8
    throw new Error('apiKey.id is required.');
    ^

Error: apiKey.id is required.
    at BasicRequestAuthenticator.RequestAuthenticator (/Users/happyuser/src/TechStack-Research/nodejs-stormpath-passport-express-sample/node_modules/stormpath/lib/authc/RequestAuthenticator.js:8:11)
    at new BasicRequestAuthenticator (/Users/happyuser/src/TechStack-Research/nodejs-stormpath-passport-express-sample/node_modules/stormpath/lib/authc/BasicRequestAuthenticator.js:7:36)
    at Object.getAuthenticator (/Users/happyuser/src/TechStack-Research/nodejs-stormpath-passport-express-sample/node_modules/stormpath/lib/authc/index.js:27:15)
    at new RequestExecutor (/Users/happyuser/src/TechStack-Research/nodejs-stormpath-passport-express-sample/node_modules/stormpath/lib/ds/RequestExecutor.js:37:37)
    at new DataStore (/Users/happyuser/src/TechStack-Research/nodejs-stormpath-passport-express-sample/node_modules/stormpath/lib/ds/DataStore.js:46:52)
    at new Client (/Users/happyuser/src/TechStack-Research/nodejs-stormpath-passport-express-sample/node_modules/stormpath/lib/Client.js:8:21)
    at new Strategy (/Users/happyuser/src/TechStack-Research/nodejs-stormpath-passport-express-sample/node_modules/passport-stormpath/lib/strategy.js:36:25)
    at Object.<anonymous> (/Users/happyuser/src/TechStack-Research/nodejs-stormpath-passport-express-sample/app.js:14:16)
    at Module._compile (module.js:573:32)
    at Object.Module._extensions..js (module.js:582:10)
robertjd commented 7 years ago

HI @subatomicglue , thanks for the bug report. It looks like this module needs some updates to work with our latest Stormpath Node SDK. I'll open this issue for us to look into.

In the meantime, have you seen our express-stormpath library? It gives you many, many more features than passport can support:

https://github.com/stormpath/express-stormpath

subatomicglue commented 7 years ago

Does it work with passport? Do you mean:

that passport can support: or tha(n) passport can support:

Would like to use passport if possible. Thank you for any updates

On Fri, Oct 28, 2016 at 4:30 PM, robertjd notifications@github.com wrote:

HI @subatomicglue https://github.com/subatomicglue , thanks for the bug report. It looks like this module needs some updates to work with our latest Stormpath Node SDK. I'll open this issue for us to look into.

In the meantime, have you seen our express-stormpath library? It gives you many, many more features that passport can support:

https://github.com/stormpath/express-stormpath

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stormpath/stormpath-passport-express-sample/issues/18#issuecomment-257033453, or mute the thread https://github.com/notifications/unsubscribe-auth/AHTlNTciZWsMQnSouBC2knJ_ya3aksBCks5q4mlYgaJpZM4Kj0K9 .

robertjd commented 7 years ago

Oops, yes, it's "more features than passport can support". Passport only helps you with login, it doesn't help you registration, password reset, or anything else really.

subatomicglue commented 7 years ago

I guess passportjs for stormpath would be useful to have when you're using passportjs for other login services as well, SSO, and stormpath is just one of those logins (custom email/pass method). Then you only need one login code path using passportjs. When registering or lost password, etc, you'd call the express-stormpath stuff.

Correct me if I'm not thinking about this right, I am just digging in now.

I know stormpath has some SSO for common services like facebook/google, but I assume it is less than you'd get with passportjs

What do you think, is there value in maintaining the passport stormpath stuff?

Sent from Gmail Mobile

robertjd commented 7 years ago

We would like to add some more maintenance to this library, but it's probably going to happen in the future, after we add some cool new features to our Express integration, like Multi-Factor auth and multi-tenant support. Thanks for asking!