LDAP login into Discourse

(Chanka Dod) #21

This works like a charm. Thanks

(Alagappan Vairavan) #22

I installed jonmbake/discourse-ldap-auth plugin. The ldap auth plugin shows up in the discourse login page. After successful ldap user auth, instead of logging in to the homepage it redirects to new user registration page. I already configured ‘auto’ for ldap_user_create_mode in plugin settings. Is there a way to sink all users from ldap? I also unchecked ‘Public registration disabled’ under login settings. Anything I am missing on plugin config?
I am on discourse 2.1.0
OpenLDAP: slapd 2.4.40

rails log sample :

Started GET "/auth/ldap" for at 2018-06-12 23:44:07 +0000

(ldap) Setup endpoint detected, running now.

(ldap) Request phase initiated.

Started POST "/auth/ldap/callback" for at 2018-06-12 23:44:15 +0000

(ldap) Setup endpoint detected, running now.

(ldap) Callback phase initiated.

Processing by Users::OmniauthCallbacksController#complete as HTML

Parameters: {"username"=>"andy", "password"=>"[FILTERED]", "provider"=>"ldap"}

Rendering users/omniauth_callbacks/complete.html.erb within layouts/no_ember

Rendered users/omniauth_callbacks/complete.html.erb within layouts/no_ember (1.6ms)

Rendered layouts/_head.html.erb (0.5ms)

Rendered common/_special_font_face.html.erb (0.3ms)

Rendered common/_discourse_stylesheet.html.erb (0.2ms)

Rendered application/_header.html.erb (0.2ms)

Completed 200 OK in 10ms (Views: 4.3ms | ActiveRecord: 0.6ms)

Started GET "/u/hp.json?_=1528847052831" for at 2018-06-12 23:44:15 +0000

Processing by UsersController#get_honeypot_value as JSON

Parameters: {"_"=>"1528847052831"}

Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.0ms)