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

**URL:** <https://meta.discourse.org/t/if-there-is-only-one-auth-method-is-it-possible-to-skip-the-modal-to-login/13716>\
**Category:** Feature\
**Created:** [2014 年3 月 14 日 00:25 UTC](https://meta.discourse.org/t/if-there-is-only-one-auth-method-is-it-possible-to-skip-the-modal-to-login/13716 "2014-03-14T00:25:54Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

作者： ![eriko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eriko/32/1915_2.png) [@eriko](https://meta.discourse.org/u/eriko)\
发布日期： [2014 年3 月 14 日 00:25 UTC](https://meta.discourse.org/t/if-there-is-only-one-auth-method-is-it-possible-to-skip-the-modal-to-login/13716/1 "2014-03-14T00:25:54Z")

</div>

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.

---

<div class="post-metadata">

作者： ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
发布日期： [2014 年3 月 14 日 00:27 UTC](https://meta.discourse.org/t/if-there-is-only-one-auth-method-is-it-possible-to-skip-the-modal-to-login/13716/2 "2014-03-14T00:27:02Z")

</div>

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

---

<div class="post-metadata">

作者： ![eriko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eriko/32/1915_2.png) [@eriko](https://meta.discourse.org/u/eriko)\
发布日期： [2014 年3 月 14 日 00:34 UTC](https://meta.discourse.org/t/if-there-is-only-one-auth-method-is-it-possible-to-skip-the-modal-to-login/13716/3 "2014-03-14T00:34:56Z")

</div>

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.

---

<div class="post-metadata">

作者： ![eriko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eriko/32/1915_2.png) [@eriko](https://meta.discourse.org/u/eriko)\
发布日期： [2014 年3 月 14 日 00:54 UTC](https://meta.discourse.org/t/if-there-is-only-one-auth-method-is-it-possible-to-skip-the-modal-to-login/13716/4 "2014-03-14T00:54:13Z")

</div>

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.

---

<div class="post-metadata">

作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
发布日期： [2014 年3 月 14 日 06:25 UTC](https://meta.discourse.org/t/if-there-is-only-one-auth-method-is-it-possible-to-skip-the-modal-to-login/13716/5 "2014-03-14T06:25:23Z")

</div>

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

---

<div class="post-metadata">

作者： ![eriko](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eriko/32/1915_2.png) [@eriko](https://meta.discourse.org/u/eriko)\
发布日期： [2014 年3 月 14 日 06:40 UTC](https://meta.discourse.org/t/if-there-is-only-one-auth-method-is-it-possible-to-skip-the-modal-to-login/13716/6 "2014-03-14T06:40:47Z")

</div>

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

---

<div class="post-metadata">

作者： ![radq](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/radq/32/104329_2.png) [@radq](https://meta.discourse.org/u/radq)\
发布日期： [2014 年3 月 15 日 11:36 UTC](https://meta.discourse.org/t/if-there-is-only-one-auth-method-is-it-possible-to-skip-the-modal-to-login/13716/7 "2014-03-15T11:36:23Z")

</div>

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

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

```

---

<div class="post-metadata">

作者： ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
发布日期： [2014 年3 月 16 日 23:21 UTC](https://meta.discourse.org/t/if-there-is-only-one-auth-method-is-it-possible-to-skip-the-modal-to-login/13716/8 "2014-03-16T23:21:23Z")

</div>

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

---

<div class="post-metadata">

作者： ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)\
发布日期： [2025 年12 月 4 日 11:09 UTC](https://meta.discourse.org/t/if-there-is-only-one-auth-method-is-it-possible-to-skip-the-modal-to-login/13716/9 "2025-12-04T11:09:28Z")

</div>


