'apiKey.id is required' error thrown when using express-stormpath with node.js

后端 未结 1 1289
我寻月下人不归
我寻月下人不归 2021-01-21 04:11

I am using express-stormpath with node.js to set up a backend server. This is a snippet of my server.js code where I get an error thrown -

app.use(stormpath.init         


        
1条回答
  •  礼貌的吻别
    2021-01-21 04:46

    I'm assuming you're using the latest version of the express-stormpath library, which is why you're probably having issues. As of the 2.0.0 release, the library uses new configuration options.

    Here's an example of the same thing using the new options:

    app.use(stormpath.init(app, {
     client: {
        apiKey: {
          file: './config/.stormpath/apikey.properties'
        }
     },
     application: {
       href: '',
     }
    }));
    

    NOTE: No secretKey is required, as this is generated automatically from your Stormpath API key secret =)

    We've made many new changes in the latest library releases that enable all sorts of new, cool stuff! <3

    0 讨论(0)
提交回复
热议问题