-
If LDAP authentication is by username (not email), add to Devise the possibility to login with username:
https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign-in-using-their-username-or-email-address https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign_in-using-their-username-or-email-address https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign-in-with-something-other-than-their-email-address
-
Add to Gemfile the gem net-ldap:
https://rubygems.org/gems/net-ldap/versions/0.15.0 https://github.com/ruby-ldap/ruby-net-ldap
gem 'net-ldap', '~> 0.15.0'
-
Follow the instructions on:
https://github.com/plataformatec/devise/wiki/How-To:-Authenticate-via-LDAP
-
In
config/initializers/ldap_authenticatable.rb
replace:[YOUR LDAP HOSTNAME]
[YOUR LDAP HOSTNAME PORT] # 389 default port
Last active
April 19, 2018 15:55
-
-
Save lorenadl/c4ee48d7d1b73b49defb63b35da89a11 to your computer and use it in GitHub Desktop.
[RAILS] LDAP authentication with devise
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment