在登录屏幕中禁用stormpath的“创建帐户”选项 [英] disable stormpath's Create account option in the login screen

查看:90
本文介绍了在登录屏幕中禁用stormpath的“创建帐户”选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在stormpath登录屏幕中禁用创建帐户。对api的呼叫应该已经由认证到该应用的用户进行。我尝试将stormpathEnableRegistration设置为false,但注册功能仍然启用。

I want to disable the create account in the stormpath login screen. The call to the api should already be made from a user authenticated to the app. I tried setting stormpathEnableRegistration to false but the registration functionality is still enabled.

  app.use(stormpath.init(app, {
     apiKeyFile: config.stormpathapi.apiKeyFile,
     application: config.stormpathapi.application,
     secretKey: config.stormpathapi.secretKey,
     sessionDuration: 1000 * 60 * 30,
     enableAutoLogin: true,
     enableUsername: true,
     stormpathEnableRegistration: false
  }));

谢谢!

推荐答案

我是 express-stormpath 库的作者,抱歉这是令人困惑的。

I'm the author of the express-stormpath library, sorry this was confusing.

这是你需要做的:


  1. 重命名 stormpathEnableRegistration - > enableRegistration

  2. 更新到图书馆的最新版本。

  1. Rename stormpathEnableRegistration -> enableRegistration.
  2. Update to the latest release of the library.

我刚刚推出了最新版本的更改,该功能在禁用此设置时会在登录页面上修复渲染问题。以前发生的是:

I just pushed a change in the latest release which fixes a rendering issue on the login page when this setting is disabled. What used to be happening was this:


  • 您将停用注册。

  • 注册页面

  • 但登录页面仍然会显示创建帐户链接。

在最新版本中,这是固定的=)

In the latest release this is fixed =)

更新:由于express-stormpath的2.xx版本现在已经出来,以上信息不再有效。相反,你应该这样做:

UPDATE: Since the 2.x.x release of express-stormpath is now out, the above information is no longer valid. Instead, you should do this:

app.use(stormpath.init(app, {
  client: {
    apiKey: {
      file: config.stormpathapi.apiKeyFile
    }
  },
  application: {
    href: config.stormpathapi.application
  },
  web: {
    register: {
      enabled: false
    }
  }
}));

这将禁用您的注册功能=)

This will disable the registration functionality for you =)

这篇关于在登录屏幕中禁用stormpath的“创建帐户”选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆