Authentication Improvements

Sorry, we did not include instructions from the code into the forum post. The commit is merely the integration layer between emr and hybridauth.

  1. Update composer to require latest release of hybridauth. (missed that in commit)
  2. Review list of hybridauth adapters. Since your goal is Firebase, I will assume Google will be the only adapter with specific protocol applicable to Firebase (if any) as per their documentation note:

Some providers such as Google and Yahoo may use multiple protocols for their APIs and as naming convention we append the protocol’s name to the adapter’s

  1. Follow instructions starting with Google steps that generate authentication related objects.

  2. Rename template yaml file in config directory and replace/add items from prior step.

  3. Hybridauth allows default callback urls as well as adapter specific callbacks. Regardless of your choice or adapter specific behaviour, after successful authentication Google needs to invoke login/hauth_check.php.

  4. For successful passthru, we lookup either users.email or users.direct_email to locate one (and only one) emr user. Multiple hits are treated as no hits.

  5. At the end, you should see login screen display small icon for each enabled adapter.
    image

  6. By clicking on ‘G’ icon, you will use your current Google session (and related email address) as emr login. Each auth provider controls various aspects of this process. For example, if you currently have no active session Google will offer login screen followed by prompt on your phone or whatever additional MFA you have set for your google account.

There is provision in the code for patients email as well to enable patient portal integration. But that branch does not take it further.

1 Like