Maintain user profile data in a non-WordPress database

You can use the WPDB class to instantiate an external DB.

Looks like roughly this:

define('EXT_DB_USER', 'username');
define('EXT_DB_PASSWORD', 'password');
define('EXT_DB_NAME', 'ext_data' );
define('EXT_DB_HOST', '123.123.123.123:3307');

$wpdb_ext = new wpdb(EXT_DB_USER, EXT_DB_PASSWORD, EXT_DB_NAME, EXT_DB_HOST);

then you just call $wpdb_ext with normal WP functions just like you would #wpdb.

For log in info it’s usually easiest to sync login information.

If you really want to build your own oAuth type solution take a look at KeyRing