Heroku Stormpath Unresponsive注册页面

我在这里跟着heroku指南在我的angular度网站上使用express.js来configurationstormpathauthentication。 我成功地能够导航到我的网站根目录下的/ login和/ register页面。 但是,当我尝试注册时,我总是以没有创build的用户和我的页面看起来像下面的图像。

在这里输入图像说明

问题实际上是我试图添加stormpath到已被configuration为单页面应用程序(angular度)的网站。 要做到这一点,你需要包括以下内容

app.use(stormpath.init(app, { web: { spa:{ enabled: true, view: path.join(__dirname, 'public', 'index.html') } } } 

将“公开”replace为单页应用程序的目录,并相应地replace“index.html”

答案在这里的express-stormpath文档中find

环境variables可能有问题,我们的文档说你应该在你的heroku应用中看到这些variables:

 heroku config | grep STORMPATH STORMPATH_API_KEY_ID: 5IFE9WD86423ZPOV8IEXAMPL STORMPATH_APKI_KEY_SECRET: 0Fx+Ebqns9OWBO5lbHce6FAYTUtnSpYwcQ+DEXAMPLE STORMPATH_URL: https://api.stormpath.com/v1/applications/YoUrStOrMPaThApPlICAtiOnId 

但是,我们的express-stormpath库期望STORMPATH_URLSTORMPATH_APPLICATION_HREF 。 您可以尝试在您的环境中将STORMPATH_APPLICATION_HREFvariables设置为Stormpath应用程序的HREF吗? 谢谢! PS我在Stormpath工作:)