# Auto-Redirect user when using SSO

**URL:** <https://forums.rocket.chat/t/auto-redirect-user-when-using-sso/10362>\
**Category:** Community Support\
**Created:** [February 15, 2021, 10:44pm UTC](https://forums.rocket.chat/t/auto-redirect-user-when-using-sso/10362 "2021-02-15T22:44:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![truCoder](https://avatars.discourse-cdn.com/v4/letter/t/f07891/32.png) [@truCoder](https://forums.rocket.chat/u/truCoder)\
**Post date:** [February 15, 2021, 10:44pm UTC](https://forums.rocket.chat/t/auto-redirect-user-when-using-sso/10362/1 "2021-02-15T22:44:19Z")

</div>

Hello i use SSO (keycloac with openID).

So when a user visits rocket.chat he is already signed in 100% of the times .

Right now when he visits rocket.chat he needs to press the SSO button to get logged in.

Anyone has a fix on how to automate this so when the user visits rocket.chat it auto logs him in without pressing the button.

I have made the installation using snaps if that helps.

---

<div class="post-metadata">

**Author:** ![truCoder](https://avatars.discourse-cdn.com/v4/letter/t/f07891/32.png) [@truCoder](https://forums.rocket.chat/u/truCoder)\
**Post date:** [February 17, 2021, 9:25am UTC](https://forums.rocket.chat/t/auto-redirect-user-when-using-sso/10362/2 "2021-02-17T09:25:59Z")

</div>

Another solution to this problem is to make for example using javascript the button on the login page to always auto get clicked when on that page.

Can someone let me know if this is possible and is it as simple as going into layout and add a custom script for it ?

---

<div class="post-metadata">

**Author:** ![rheide](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/rheide/32/3524_2.png) [@rheide](https://forums.rocket.chat/u/rheide)\
**Post date:** [February 18, 2022, 11:16pm UTC](https://forums.rocket.chat/t/auto-redirect-user-when-using-sso/10362/3 "2022-02-18T23:16:57Z")

</div>

Did you ever figure anything out? Would love to know.

---

<div class="post-metadata">

**Author:** ![Saffsaff](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@Saffsaff](https://forums.rocket.chat/u/Saffsaff)\
**Post date:** [February 20, 2022, 9:15am UTC](https://forums.rocket.chat/t/auto-redirect-user-when-using-sso/10362/4 "2022-02-20T09:15:32Z")

</div>

Hi there… we’ve used the rest API’s to auto log from our website to Rocket.chat… Happy to share what we did if it helps!

---

<div class="post-metadata">

**Author:** ![Saffsaff](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@Saffsaff](https://forums.rocket.chat/u/Saffsaff)\
**Post date:** [February 20, 2022, 9:16am UTC](https://forums.rocket.chat/t/auto-redirect-user-when-using-sso/10362/5 "2022-02-20T09:16:14Z")

</div>

and they dont have to login… we managed to bypass the login…
