# SSO\_SYNC 无法正常工作

**URL:** https://meta.discourse.org/t/sso-sync-not-working/87150
**Category:** SSO
**Created:** [2018年五月10日 09:26 UTC](https://meta.discourse.org/t/sso-sync-not-working/87150 "2018-05-10T09:26:18Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [2018年五月10日 10:30 UTC](https://meta.discourse.org/t/sso-sync-not-working/87150/2 "2018-05-10T10:30:03Z")

</div>

As per

> [@Sync DiscourseConnect user data with the sync\_sso route](https://meta.discourse.org/t/sync-sso-user-data-with-the-sync-sso-route/84398):
>
> Single Sign On can be used to handle Discourse user authentication from a separate site. The [Setup DiscourseConnect - Official Single-Sign-On for Discourse (sso)](https://meta.discourse.org/t/official-single-sign-on-for-discourse-sso/13045) topic has details about how to implement [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) . The Problem With [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) , Discourse users will be created or updated when they login to Discourse from your external website. What it doesn’t handle is when you need to create or update Discourse users without having them login to your site. For sites that are using…

You have to use the following:

```plaintext
$api_username = 'system';

```

---

_[View the full topic](https://meta.discourse.org/t/sso-sync-not-working/87150)._
