# 确保用户已登录 Discourse

**URL:** <https://meta.discourse.org/t/ensure-that-user-is-signed-in-to-discourse/86396>\
**Category:** SSO\
**Created:** [2018 年4 月 29 日 08:03 UTC](https://meta.discourse.org/t/ensure-that-user-is-signed-in-to-discourse/86396 "2018-04-29T08:03:37Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

作者： ![shahidmir](https://avatars.discourse-cdn.com/v4/letter/s/9dc877/32.png) [@shahidmir](https://meta.discourse.org/u/shahidmir)\
发布日期： [2018 年5 月 24 日 12:54 UTC](https://meta.discourse.org/t/ensure-that-user-is-signed-in-to-discourse/86396/4 "2018-05-24T12:54:31Z")

</div>

Hi  
I find myself in the same situation.  
I will be migrating users to discourse. Until they login via the SSO, there will be no record in the single\_sigon\_records.

If any one of my users changes his email in the main app, before attempting an SSO into discourse, then the next time he comes to discourse will be with a new email address, which will fail.

I do not want to use a pre-staging strategy as some of those users may never even login to discourse, hence want to avoid creating records for no reason.

But if i have to go down this route, could I insert data into the ‘single\_sigon\_records’ table manually, or would it have to be via the sso\_sync endpoint?  
I notice the table has a ‘last\_payload’ field, which could be problematic in this case?

regards  
shahid

---

_[View the full topic](https://meta.discourse.org/t/ensure-that-user-is-signed-in-to-discourse/86396)._
