You will need the following settings:
g_oauth_client_id "idcode"
g_oauth_client_secret "secretcode"
g_oauth_trim "true" - Trim @domain.name from user before lookup
g_oauth_url "http://your.oauth.endpoint/oauth.php"
g_authent_lookup "true" - If set then oauth is used as password check as well as account existence.
With the above settings surgemail will use nwauth to store most details about user accounts, but will check for existence, and passwords with the oauth server.