"Create or Sync Discourse Users on Login" is not working

I have enabled “Create or Sync Discourse Users on Login” because I want a Discourse account to be created when people log into my WordPress account, via SSO.

The SSO connection is correct and working, people are using the forum, but newly registered users or users who registered before the forum is added have to go through these steps:

  1. Visit the forum site.
  2. Click login
  3. Their account is created, but they then have to verify their email address.

So not only is the “Create or Sync” function not working, but the ability to skip verifying email addresses (which I’ve also done on WordPress) doesn’t seem to work either.

How can I fix all these issues please?

Hey Shaun, sorry to hear you’re having issues. Just so I understand what your concern is:

  • Could you lay out what flow you’re expecting? (i.e. similar to your list there, but what you expect should happen)
  • Are you saying that you’re expecting not to verify users’ emails at all? Or there is a double verification being required?
2 Likes

Hi Angus,

I’ve actually fixed the double verification problem now, using a filter. So that’s all good (I’m just not sure why it started happening, a few days after it was all set up… strange).

But as for the other issue, what I’m expecting is:

  • User signs up to the site on WordPress
  • A forum account is created for them in the background

and:

  • Existing user who signed up weeks ago logs into the site today
  • A forum account is created in the background.

At the moment none of that is happening. The user has to manually visit the forum site and click Login. This is exactly the same as what was happening before I ticked the “Create or Sync Discourse Users on Login” checkbox, so it seems the checkbox has changed nothing.

I see, thanks for explaining. Ok, let’s focus on the account creation issue. Just a further clarification. Are you saying that you’re expecting this:

  • User signs up to the site on WordPress
  • User is logged into Wordpress (automatically after signup)
  • A forum account is created for them in the background

And

  • User goes to the forum and they’re logged in

Is that right?

If so, there is a difference between the creation of a user account and a login session. DiscourseConnect does not automatically create a login session for the user on Discourse when the user logs into Wordpress. Unfortunately, no SSO solution works this way for independent software frameworks like Wordpress and Discourse. It only works this way for platforms like Google or Microsoft.

1 Like

Yes, that would all be perfect.

From what I’ve read, they can’t be automatically logged in, because it’s a different domain. That’s fine.

But the account is not being created at all when they register or login to WordPress. That’s my main issue.

1 Like

I see. Give me a moment. I’m just doing a run through myself so we can compare notes on the latest versions.

3 Likes

Hey Shaun, I haven’t been able to recreate your issue yet. Here’s a video of me successfully using the feature on my demonstration instances. Have a look and let me know if you’re doing or expecting anything different:

2 Likes

I’ve figured this out!

Sorry, it’s because I recently changed the username of my main account.

So the API was failing. Everything else worked so I didn’t realise that was it.

Thank you so much for your time.

1 Like

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