# No login methods when using Discourse Connect only

**URL:** https://meta.discourse.org/t/no-login-methods-when-using-discourse-connect-only/373504
**Category:** Bug
**Tags:** discourseconnect
**Created:** [July 9, 2025, 8:03am UTC](https://meta.discourse.org/t/no-login-methods-when-using-discourse-connect-only/373504 "2025-07-09T08:03:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kev-is-coding-for-adn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kev-is-coding-for-adn/32/506966_2.png) [@kev-is-coding-for-adn](https://meta.discourse.org/u/kev-is-coding-for-adn)
#### Post date: [July 9, 2025, 8:03am UTC](https://meta.discourse.org/t/no-login-methods-when-using-discourse-connect-only/373504/1 "2025-07-09T08:03:33Z")

</div>

Hi,

I wrote a message 2 weeks ago in the “Support” category ([Login page "/login" show "no configured method" - #2 by kev-is-coding-for-adn](https://meta.discourse.org/t/login-page-login-show-no-configured-method/372763/2)) but no one seems to have an answer for me.

Because I think this is a bug, I will post it here.

My setup is simple :

- Login required is enabled
- [Discourse Connect](https://meta.discourse.org/t/13045?silent=true) is enabled (and working)
- Local logins and Local Logins by emails are disabled

From an anonymous session, if I go to the home page of my community ([https://community.adn-soft.com](https://community.adn-soft.com)), it will show the main page with the button to “Log In”. But if I want to go directly to any targeting page ([https://community.adn-soft.com/t/test-categories-sujet-et-etiquette/69](https://community.adn-soft.com/t/test-categories-sujet-et-etiquette/69)), I’m redirected to the “/login” page which says “No login methods”.

From my point of view, because I have only 1 login methods configured ([Discourse Connect](https://meta.discourse.org/t/13045?silent=true)), it should directly use it, or at least show the login page like the home page.

I think that instead of redirecting to “/login”, it should redirect to “/login-required”.

Is there something I’m doing wrong ?

Thanks for your help  
Kevin

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [July 10, 2025, 5:01pm UTC](https://meta.discourse.org/t/no-login-methods-when-using-discourse-connect-only/373504/4 "2025-07-10T17:01:01Z")

</div>

Tried locally and it worked fine.

As soon as I enter the topic page as “anon” I’m being redirected to the /sso endpoint which then redirects to the local “[discourse connect](https://meta.discourse.org/t/13045?silent=true)” I have setup & configured (on localhost:5000).

When I try [https://community.adn-soft.com/t/-/69](https://community.adn-soft.com/t/-/69)

 ![Screenshot 2025-07-10 at 18.53.01](https://global.discourse-cdn.com/meta/original/4X/1/a/1/1a1a9e99e1f37402a51e1a7b884d8a9c595d3372.jpeg)

I’m being redirected to the /login endpoint 🤔

Looking at the code, and especially the [`redirect_to_login`](https://github.com/discourse/discourse/blob/16955d5dc49d99f8cf578a1222000a48b65d9443/app/controllers/application_controller.rb#L739-L758) callback, I can see we’ll only redirect to the /sso endpoint when **both** “[discourse connect](https://meta.discourse.org/t/13045?silent=true)” is enabled **as well as** the “auth immediately” site setting

> <https://github.com/discourse/discourse/blob/16955d5dc49d99f8cf578a1222000a48b65d9443/app/controllers/application_controller.rb#L742>

By default, that site setting is enabled, but when I disable it, then

 ![Screenshot 2025-07-10 at 18.59.04](https://global.discourse-cdn.com/meta/original/4X/b/0/f/b0f482de1089927154667597cce985b1791d6439.jpeg)

So my guess is that you have that site setting disabled and you should enable it to make it work 👍

* * *

Note: I’m not entirely sure why this site setting exists, but I’m in the process of [getting rid](https://github.com/discourse/discourse/pull/33072) of it along with a bunch of other auth-related fix.

---

<div class="post-metadata">

### Author: ![kev-is-coding-for-adn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kev-is-coding-for-adn/32/506966_2.png) [@kev-is-coding-for-adn](https://meta.discourse.org/u/kev-is-coding-for-adn)
#### Post date: [July 10, 2025, 7:27pm UTC](https://meta.discourse.org/t/no-login-methods-when-using-discourse-connect-only/373504/6 "2025-07-10T19:27:31Z")

</div>

Yes, you’re completly right.

But if I enable this behavior, then I don’t have any home page anymore.  
Just for you to see, I have activated it right now.

If you go to [https://community.adn-soft.com](https://community.adn-soft.com), it will directly redirect to the sso provider without showing home page.

---

<div class="post-metadata">

### Author: ![kev-is-coding-for-adn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kev-is-coding-for-adn/32/506966_2.png) [@kev-is-coding-for-adn](https://meta.discourse.org/u/kev-is-coding-for-adn)
#### Post date: [July 12, 2025, 6:56am UTC](https://meta.discourse.org/t/no-login-methods-when-using-discourse-connect-only/373504/7 "2025-07-12T06:56:03Z")

</div>

Edit : I just put it back to the previous state because I need this home page
