If there is only one auth method is it possible to skip the modal to login


(eriko) #1

So our site is setup as a closed garden and uses only CAS auth so the Log In modal is not really of any use. How hard would it be to:

  • Tell the ember app to just use the only auth method if there is only one.
  • Have plugin do the same if the setting is set in the plugin.

If it does not seem that hard and seems like a good idea can you point me to to where I could start working on a PR.


Plugin to override Sign In button
(Jeff Atwood) #2

You want the single sign on settings, yes? Replacing login entirely? Search for “sso” in the site settings


(eriko) #3

I am not thinking about switching to the Official SSO as that will not work with our CAS setup. If the official sso does the same thing I want then it gives me a place to look.


(eriko) #4

To clarify:

I am looking for a way so that the following happens:

  • you click first Log In in the header
  • the toolbarless window to use the single auth source

right now

  • you click first Log In in the header
  • the modal that lists all the auth methods Log in in with XXXX opens.
  • you select the single available one
  • the toolbarless window to use the single auth source

I am actually after this for accessibility reasons as currently after finding and selecting Log in you then have to go find the second specific Log in with XXXX. It is rather confusing the only reason I knew to look for it while I was using the app with my eyes closed is that I knew it was there.


(Sam Saffron) #5

There is no option for this, but I am open to supporting it via a site setting.


(eriko) #6

Any thoughts on where I can start digging to make a PR?
I will be away from coding till GMT - 7:00 Monday.


(Vikhyat Korrapati) #7

I would start by looking at the showLogin action on Discourse.ApplicationRoute – for Hummingbird I have the following in a plugin:

Discourse.ApplicationRoute.reopen({
  actions: {
    showLogin: function() {
      window.location = "http://hummingbird.me/users/sign_in";
    }
  }
});

(Sam Saffron) #8

Have a look at how SSO is implemented and share the logic.