- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 AuthLogic 进行登录,但我希望“电子邮件”是可选的。然而,开箱即用的 authlogic 似乎使这一点得到了验证。有人知道解决方法吗?
最佳答案
来自 authlogic 示例 rails 应用程序:
- Set up your model
Make sure you have a model that you will be authenticating with. Since we are using the User model it should look something like:
class User < ActiveRecord::Base
acts_as_authentic do |c|
c.my_config_option = my_value # for available options see documentation in: Authlogic::ActsAsAuthentic
end # block optional
endOne thing to note here is that this tries to take care of all the authentication grunt work, including validating your login, email, password, and token fields. You can easily disable this with configuration. Ex: c.validate_email_field = false. See the Authlogic::ActsAsAuthentic sub modules in the documentation for more details.
You can easily disable this with configuration. Ex: c.validate_email_field = false.
关于ruby-on-rails - 覆盖 authlogic 的电子邮件验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4419390/
我正在尝试在 Rails 中编写一个简单的 OAuth 消费者应用程序。我正在使用 Authlogic 处理身份验证,并使用 Authlogic OAuth 插件来执行 oauth。 oauth 插件
尽管遵循文档,但我收到以下错误。 在 test_helper.rb 中 ENV["RAILS_ENV"] = "test" require File.expand_path(File.dirname(
我最近开始使用我非常喜欢的 Python 3。我是学徒期的系统管理员,所以我几乎没有编程经验。我想制作一个小程序,它会在每次有人通过 ssh 登录我的系统时告诉我。我将使用 espeak-python
rails 社区似乎正在离开 Authlogic 转而支持 Devise。我已经使用 Authlogic 一年多了,想知道原因是什么。这只是营销,还是有充分的理由?在这一点上,我使用了 Devise
早上好 我正在尝试找出管理这种用户情况的最佳方法。 我有用户和分支机构。两者之间已经存在HABTM关系,因为用户可以注册affiliates,affiliates可以接触用户,获取各种数据点。 现在我
是否可以让 AuthLogic 验证密码确认(如果存在),否则忽略它?所以,如果我的参数如下,我希望失败: { user: { password: "abcd", password_confirmat
我很难与Authlogic一起使用OpenId身份验证。看来问题出在open_id_authentication插件的更改。从到目前为止的内容来看,需要从使用gem转换为使用插件。 到目前为止,这是我
所以我让 Authlogic 可以很好地处理这个 user_sessions/new看法: user_session_path do |f| %> Invalid username o
关闭。这个问题是off-topic .它目前不接受答案。 想改善这个问题吗? Update the question所以它是 on-topic对于堆栈溢出。 8年前关闭。 Improve this q
我在我的应用程序中使用 Authlogic gem,我需要用户在 15 分钟不活动后自动注销。谁能告诉我该怎么做? 最佳答案 在用户模型上: acts_as_authentic do |c| c.
关注此 tutorial收到以下错误: NameError in Admin/dashboardsController#show uninitialized constant Admin::Dash
我计划公开 Rails 项目的数据库以供下载。该数据库包含一个 Authlogic 用户表,其中包含 crypted_password 和 password_salt 字段。这些密码的存储安全性如
我使用 Authlogic 来处理登录/身份验证/ session 等,我使用 Paypal 来处理我的网站订阅付款。对于试用期已过的用户,我想在他们完成 Paypal 付款流程后自动登录,但如果没有
Authlogic 在创建新用户时似乎忽略了密码参数。这是我的 users_controller 类: class Api::V1::UsersController @user, :status =
我在我的 ubuntu 14.04 上遇到了这个问题,我有 rails 4.1.8 和 ruby 2.1.2。上次我在 mac OSX 10.10 上尝试使用相同的 rails 和 ruby
我目前正在开发一个存储明文密码的 Rails 应用程序 (...)。所以我正在迁移到使用“标准”SHA512 加密的 Authlogic 身份验证。 我做的很好: #file /models/user
我最近在我的项目中实现了 Authlogic 以进行身份验证。我关注了http://railscasts.com/episodes/160-authlogic并启动并运行。想要添加电子邮件确认,我
在我的一些 Controller 中,我有一个 before_filter 检查用户是否登录?用于 CRUD 操作。 application.rb def logged_in? unless cu
在我的系统中,用户通过 rails 网站注册。我必须从用 ruby 编写的自定义应用程序服务器对用户进行身份验证。 错误信息: You must activate the Authlogic::S
我如何覆盖/设置 authlogic 以使用电子邮件字段而不是用户名字段进行注册和身份验证,对于某些注册场景来说,用户名 + 电子邮件有时过于紧张 最佳答案 如果您只是删除 login 列并添加一个
我是一名优秀的程序员,十分优秀!