Users are experiencing issues with Discourse SSO integration. Problem: When users exist in an external ERP system but not in Discourse, workflows fail, and users don’t receive notifications. Goal: Ensure users are signed in to Discourse before proceeding with workflows.
adopilot is looking for a way to redirect users to sign in to Discourse and then return to the original form if they don’t exist in Discourse. pfaffman suggests using the API to force user creation when the account is created via SSO. sam recommends calling the #sync_sso endpoint with the full SSO payload to pre-stage accounts.
However, shahidmir prefers not to use pre-staging due to potential unnecessary record creation. Instead, he considers inserting data into the single_sigon_records table manually but is concerned about the last_payload field.
Our discource is set to use SSO from our businesses app.
In few business process we use discourse as email and notification relay.
Some business flow starting at our erp with forms and moving on discource.
Since discource crating SSO users only when they loged in discource, we have cases that users exists in our erp, but they do not exists in discoure.
It happens if they did not sing in discource ever.
If my users does not exists in discource the work flow fails.
User is not going to be notified by email or desktop notification.
Our app can check does user exist in discource by finding user by external-id.
But I do not have an idea how to push user to sing in to discource and send him back to initial form, if app realize that user does not exist in discourse.
Is there some discource endpoint that will after singing in redirect user to parametered url ?
I want to send user to singing in discource and get back to my form ?
You can use the API to force the user to be crested when the account is created in SSO. The Wordpress plugin did this, so you might look the for an exempt.
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?