Auth0 Home Blog Docs

Auth0 as the identity server for a custom database connection

custom-database
custom-login

#1

Hi all, we have a custom, internal authentication scheme that uses username and PIN. Currently this is externally exposed through an API manager where you ask for an access token for a given client Id and client secret and then use that access token to call the authentication API. I was able to create a custom database connection that uses NodeJS code to do the above. My next step is to have Auth0 become the identity server for this custom database connection. Is this possible? If so, how? If not, is there a different route to go? Basically we want the login process for an external vendor to be handled through Auth0 to our backend API.

Thanks for any help!


#2

There are a couple of options to achieve authentication to your authentication API, via Auth0:

1. Custom Social Connection

If your existing authentication is an OAuth2 Authorization server, you can setup a Custom Social Connection using the extension. This allows users to authenticate with Auth0’s authentication API, which in turn call your Authorization server to authenticate the user.

2. Custom Database Connection

You can use a Custom Database Connection to query and authenticate users in your custom database. This is ideal if you have a legacy authentication database that doesn’t use the OAuth2 protocol. Custom database connections allow you to Import users into Auth0, which can help you migrate your users with the goal of phasing out your legacy database.


#3