I have successfully installed discourse sso for my site. What I need is to set up the same sso for admin panel logged in users as well , with admin/moderator rights offcourse. Admin Panel is namespace in my rails app.
Wait – what exactly are you trying to do? To me, it currently seems like you want to allow two different user bases managed by different applications to log in, namely your normal users (that have an account in some application) and your staff (which have an account in a different “Admin Panel” application). Is that correct?
NO, Its a single ruby on rails application. It has two kinds of interface, one for normal users, and one for admin. I have already added discourse to the normal users session controller.
What I am trying to do is add the discourse to the admin controller , so that when the admin is logged into the admin panel , and opens discourse, they get logged in to discourse with admin rights.
Good! In that case, you need to implement that logic in your application, as Discourse only supports a single SSO endpoint.
When your application receives a SSO request and the user is an admin, it should return a payload as usual, but add
&admin=true&moderator=true (modify as needed). The user will be granted the specified rights when he logs on.