# Problem on SSO Login

**URL:** https://meta.discourse.org/t/problem-on-sso-login/229920
**Category:** SSO
**Created:** [June 14, 2022, 12:25pm UTC](https://meta.discourse.org/t/problem-on-sso-login/229920 "2022-06-14T12:25:53Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![yasham07](https://avatars.discourse-cdn.com/v4/letter/y/4af34b/32.png) [@yasham07](https://meta.discourse.org/u/yasham07)
#### Post date: [June 14, 2022, 12:25pm UTC](https://meta.discourse.org/t/problem-on-sso-login/229920/1 "2022-06-14T12:25:54Z")

</div>

I am successfully created SSO Login. but problem is that whenever I am Login through SSO every time I have to click on Login button.  
But I found a method that doesn’t require me to click the login button. The solution is, I disable the **login required** settings. and I call [mywebsite.com](http://forum.mywebsite.com/login) which calls login button automatically, but if I disable **login required** then login button does not call.  
I don’t want to give anonymous access to my website. So I can’t use this method.

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/b/4/1b47848b85a4d53946f08e6c124f8a61cb0a04bb.png)

Does anyone have a better solution so that the login button gets called automatically? Or Any Other Idea?

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [June 14, 2022, 12:47pm UTC](https://meta.discourse.org/t/problem-on-sso-login/229920/2 "2022-06-14T12:47:14Z")

</div>

I don’t understand the question, pardon me if I’m not helpful.

If you enable login required, disable local logins and let the SSO be your only login method, anyone who visits your forum will be presented with a page which has a login button. Once they log in via SSO, they should remain logged in hence no need to click login multiple times. This way anons can not see the site without logging in first.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [June 14, 2022, 1:12pm UTC](https://meta.discourse.org/t/problem-on-sso-login/229920/3 "2022-06-14T13:12:35Z")

</div>

> [@yasham07](#):
>
> I am successfully created SSO Login.

How? What is the SSO server?

> [@yasham07](#):
>
> whenever I am Login through SSO every time I have to click on Login button.

You’re saying that if you have logged in on your SSO site and later visit Discourse you have to click the Login button for Discourse to now that you’re logged in? And what happens when you click the login button?

> [@yasham07](#):
>
> I don’t want to give anonymous access to my website. So I can’t use this method.

If you **don’t** want to allow anonymous access to your site then you **do** want to enable `login_requred`.

---

<div class="post-metadata">

### Author: ![yasham07](https://avatars.discourse-cdn.com/v4/letter/y/4af34b/32.png) [@yasham07](https://meta.discourse.org/u/yasham07)
#### Post date: [June 14, 2022, 6:20pm UTC](https://meta.discourse.org/t/problem-on-sso-login/229920/4 "2022-06-14T18:20:52Z")

</div>

> [@pfaffman](#):
>
> If you **don’t** want to allow anonymous access to your site then you **do** want to enable `login_requred`.

yes I have to enable **login required** for disallowed anonymous access.  
I am explaining again  
The following flow is executed for my website when I enable **SSO login** and set everything up for **SSO login**

1. this is my main website. here a one community button ,when user click this button it will call [mywebsite.com](http://forum.mywebsite.com/login)  

2. [mywebsite.com](http://forum.mywebsite.com/login) call my community(discourse community) website login page. then user who logged in main website is automatically logged as in community website(when I disabled **login required** setting of community website). But problem is that when I enable **login required** then login page does not call automatically. I have to click login button manually then It will logged the community page.  

So I need some way to call the login button(or page) automatically without disabling **login required** settings.

This is official SSO Documentation link

> [@Setup DiscourseConnect - Official Single-Sign-On for Discourse (sso)](https://meta.discourse.org/t/discourseconnect-official-single-sign-on-for-discourse-sso/13045):
>
> [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) is a core Discourse feature that allows you to configure “Single Sign-On (SSO)” to completely outsource all user registration and login from Discourse to another site. Offered to our [pro, business and enterprise hosting customers](https://discourse.org/pricing). information_source (Feb 2021) ‘[Discourse SSO](https://meta.discourse.org/t/13045?silent=true)’ is now ‘[DiscourseConnect](https://meta.discourse.org/t/13045?silent=true)’. If you are running an old version of Discourse, the settings below will be named sso\_... rather than discourse\_connect\_... The Problem Many sites wishing to integrate wit…

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [June 14, 2022, 8:51pm UTC](https://meta.discourse.org/t/problem-on-sso-login/229920/5 "2022-06-14T20:51:26Z")

</div>

Don’t link to `/login` but to `/session/sso` to login automatically.
