The apiKey key identifier and secret are required even if they exist in express storm mode

I am trying to use express-stormpath in my Heroku application. I follow the docs here and my code is very simple:

var express = require('express');
var app = express();
var stormpath = require('express-stormpath');

app.use(stormpath.init(app, {
  website: true
}));

app.on('stormpath.ready', function() {
  app.listen(3000);
});

I already covered this question and followed Heroku devcenter docs . The docs say that it is not necessary for Heroku to pass parameters, but I still tried to use the options and nothing works. For example, I tried this:

app.use(stormpath.init(app, {
   // client: {
   //   file: './xxx.properties'
   // },
   client: {
     apiKey: {
       file: './xxx.properties',
       id: process.env.STORMPATH_API_KEY_ID || 'xxx',
       secret: process.env.STORMPATH_API_KEY_SECRET || 'xxx'    
     }
   },
   application: {
     href: 'https://api.stormpath.com/v1/applications/blah'
   },
}));

To try to see what happens, I added the console.log line to the stormpath-config valpath template strategy to print the client object, and this gives me the following:

{ file: './apiKey-xxx.properties',
  id: 'xxx',
  secret: 'xxx' }
{ file: null, id: null, secret: null }

Error: API key ID and secret is required.

, , id secret?

heroku config | grep STORMPATH,

STORMPATH_API_KEY_ID:     xxxx
STORMPATH_API_KEY_SECRET: xxxx
STORMPATH_URL:    https://api.stormpath.com/v1/applications/[myappurl]
+4
2

express-stormpath, Heroku Stormpath.

100% / Stormpath.

:

  • STORMPATH_URL ( URL- )
  • STORMPATH_API_KEY_ID
  • STORMPATH_API_KEY_SECRET

, // .. , , , :

  • STORMPATH_APPLICATION_HREF
  • STORMPATH_CLIENT_APIKEY_ID
  • STORMPATH_CLIENT_APIKEY_SECRET

, Heroku, , .

, , Heroku, , Heroku , - .

/. , , , .

, , , .

Stormpath, , "" : randall@stormpath.com

+2

, Heroku CLI, STORMPATH_CLIENT_APIKEY_ID STORMPATH_CLIENT_APIKEY_SECRET. - Heroku , express-stormpath apiKey ( ).

+2

All Articles