I am trying to implement auth0 as IDP for my discourse account. I have added a sign up field at auth0 named username. I want this field to be validated through discourse api, that whatever username, a user enters, it should be looked up in discourse and only validated if it’s available there.
Is there any way I can implement this? The function returns validation before the API call is completed.
Have you considered using the discourse OAuth2 plugin? This is how we have integrated discourse with Auth0, and it should abstract away some of the challenges you are facing.
Yes I am using discourse oauth2 plugin.
But the issue I am facing is at the universal login side, I want one of my custom field at universal login sign up page to be linked with discourse account. So that when someone signs up through auth0 universal login, he has to enter a username, which will be validated through discourse (checking if this username exists in discourse or not and return validation based on that).