It’s not clear if you only want to change the db connection once for the entire server or once per user request at authentication, or once per user with the db obtained at auth (in which case you’ll need to store it in the Users Session), but have a look at a new feature in v4.0.53 (On MyGet) which lets you change the DB Connection at runtime: