# Fire SSO Login to discourse onLogIn on external site

**URL:** <https://meta.discourse.org/t/fire-sso-login-to-discourse-onlogin-on-external-site/145222>\
**Category:** Product Support\
**Created:** [23 במרץ,‏ 2020,‏ 1:23pm UTC](https://meta.discourse.org/t/fire-sso-login-to-discourse-onlogin-on-external-site/145222 "2020-03-23T13:23:02Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![bvdrie72](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bvdrie72/32/158775_2.png) [@bvdrie72](https://meta.discourse.org/u/bvdrie72)\
**Post date:** [23 במרץ,‏ 2020,‏ 1:23pm UTC](https://meta.discourse.org/t/fire-sso-login-to-discourse-onlogin-on-external-site/145222/1 "2020-03-23T13:23:02Z")

</div>

We are using discourse with SSO and it works great.

However, I am running into an odd situation.

- We are leveraging Discourse private messaging links on our external site ([paddling.com](http://paddling.com)) to spawn a new private message on discourse ([forums.paddling.com](http://forums.paddling.com)).
- If the user is logged in to the forums, it works exactly as expected.
- If the user logs in to [paddling.com](http://paddling.com) (but doesn’t go to the forums first) when the user clicks on the link to spawn a new message, it simply opens the forums (without spawning a new message)
- If the user clicks on the message link a second time, then the message works.

It seems to me that the issue is that while the user is logged in to [paddling.com](http://paddling.com), they are not logged into the forums until they view a page on [forums.paddling.com](http://forums.paddling.com).

Here is an example classified ad so you can see the process:  
[https://paddling.com/classifieds/trak-2-0-for-sale-747840/](https://paddling.com/classifieds/trak-2-0-for-sale-747840/)

Is there a way to fire the SSO login (to [forums.paddling.com](http://forums.paddling.com)) upon login on the external site ([paddling.com](http://paddling.com))?

I found one reference that could work.:

> [@How to login a user via API?](https://meta.discourse.org/t/how-to-login-a-user-via-api/134272/3):
>
> There’s a React Native app that you can use as a reference to find out how to login. This file in particular should help you get started.

---

_[View the full topic](https://meta.discourse.org/t/fire-sso-login-to-discourse-onlogin-on-external-site/145222)._
