# I can't log in with SSO

**URL:** https://meta.discourse.org/t/i-cant-log-in-with-sso/91659
**Category:** Support
**Created:** [July 5, 2018, 9:10pm UTC](https://meta.discourse.org/t/i-cant-log-in-with-sso/91659 "2018-07-05T21:10:15Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Dmitriy\_Gryn](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@Dmitriy\_Gryn](https://meta.discourse.org/u/Dmitriy_Gryn)
#### Post date: [July 5, 2018, 9:10pm UTC](https://meta.discourse.org/t/i-cant-log-in-with-sso/91659/1 "2018-07-05T21:10:15Z")

</div>

Forum has sso. And only one button “Log in”, i tried to add “Sign in” button by adding to CSS

```css
.login-button::after {
    content: " | Sign up";
}

```

after testing, i delete this and save. But now i can`t log in to forum, and when press “log in” i have popup

I need just redirect to mother site(SSO)

Help please! Thanks

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [July 5, 2018, 9:19pm UTC](https://meta.discourse.org/t/i-cant-log-in-with-sso/91659/2 "2018-07-05T21:19:27Z")

</div>

You need to bypass SSO and fix the problem. If you have access to your server run this to disable SSO:

```plaintext
cd /var/discourse
./launcher enter app
rails c
SiteSetting.enable_sso=false
exit
exit

```

If you can’t access the server, you can use the `/users/admin-login` route to bypass SSO. Go to  
`http://forum.example.com/users/admin-login`, enter your email address, and then follow the instructions in the email you receive.

---

<div class="post-metadata">

### Author: ![Dmitriy\_Gryn](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@Dmitriy\_Gryn](https://meta.discourse.org/u/Dmitriy_Gryn)
#### Post date: [July 5, 2018, 9:52pm UTC](https://meta.discourse.org/t/i-cant-log-in-with-sso/91659/3 "2018-07-05T21:52:42Z")

</div>

Great. Thanks  
I don’t have any idea what the problem could be. .  
I think css can’t break  
Maybe some settings in Login tab.

But sso redirect break after that css selector

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [July 5, 2018, 10:21pm UTC](https://meta.discourse.org/t/i-cant-log-in-with-sso/91659/4 "2018-07-05T22:21:29Z")

</div>

> [@Dmitriy\_Gryn](#):
>
> But sso redirect break after that css selector

I’m not sure what the problem with that is. The easiest way to set the text for the login button is to go to Admin/Customize/Text Content and search for ’ js.log\_in’. You can edit the text to say ‘Log In | Sign Up’.

---

<div class="post-metadata">

### Author: ![Dmitriy\_Gryn](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@Dmitriy\_Gryn](https://meta.discourse.org/u/Dmitriy_Gryn)
#### Post date: [July 6, 2018, 3:32am UTC](https://meta.discourse.org/t/i-cant-log-in-with-sso/91659/5 "2018-07-06T03:32:48Z")

</div>

I’m sorry for disturbing you, but it`s matter of life and death.

By steps

1. I added and saved  
.login-button::after {  
content: " | Sign up";  
}

2. saved and saw that “log in” button isn`t redirect me to sso site but show me popup login

3.I deleted that selector and saved. But ‘Log In’ button didn`t return old action, it just show me popup.

How sso url and button are releted? Can i change relation?

Also i have “sign up” button that redirect me to “sign up” page of sso site, it still work correct. I can`t undestand how css can broken redirect to sso action…

P.S Little note, now in fact i am having little icon with person, but didnt have it before first step.

```css
.fa-user:before {
    content: "";
}

```

Sorry and Thanks

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [July 6, 2018, 4:12am UTC](https://meta.discourse.org/t/i-cant-log-in-with-sso/91659/6 "2018-07-06T04:12:46Z")

</div>

> [@Dmitriy\_Gryn](#):
>
> But ‘Log In’ button didn`t return old action, it just show me popup.

Make sure that ‘enable sso’ is checked.

---

<div class="post-metadata">

### Author: ![Dmitriy\_Gryn](https://avatars.discourse-cdn.com/v4/letter/d/ccd318/32.png) [@Dmitriy\_Gryn](https://meta.discourse.org/u/Dmitriy_Gryn)
#### Post date: [July 6, 2018, 5:39am UTC](https://meta.discourse.org/t/i-cant-log-in-with-sso/91659/7 "2018-07-06T05:39:48Z")

</div>

Many thanks for the help. You saved me.

`SiteSetting.enable_sso = true` - fixed up the isssue

One more questions.  
I have ‘sign up’ and ‘log in’ buttons. But ‘Sign In’ appears after click on .d-header clearfix  
How to make “Sign Up” appear always if current\_user == nil (anonymous) ?  
Maybe change CSS, JS or some settings ?

I read some topics on _meta.discourse_ was said that it doesn’t make sense when you are using SSO. But we need that button.

This is the last question I promise. Thanks

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [August 5, 2018, 8:34am UTC](https://meta.discourse.org/t/i-cant-log-in-with-sso/91659/9 "2018-08-05T08:34:36Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
