Universal login API set up for custom applications

Hello I have 2 Regular Web Application I want to use universal Login to make it where my user has an account with domain 1 and can log into domain 2 with the same information.
App 1 was created with Wordpress plugin and App 2 with SAML. How should I go about setting up the databases and the API for universal login since I can not use any of the integrations? When I have them share the same database the 2nd domain gives me errors when attempting to access the site claiming the resource does not exist.