Discourse Login using external API


Can I use an external API in Discourse’s default authentication and registration? I would like to validate our users using the external API in the system and just use the UI from Discourse during login, registration, change password, etc.
The user data is already migrated in Discourse DB from our own DB.

There are loads of solutions here, some for proprietary systems like Discord which I believe is now native, but there is also an OIDC plugin, which is the right way to go if you can use it: