rowy icon indicating copy to clipboard operation
rowy copied to clipboard

Enable auth config in .env

Open cjsewell opened this issue 2 years ago • 1 comments

When using authentication with Microsoft and your MS app is configured to for single tenant only, you must pass tenant and clientId via customParameters to firebseui.

Currently, there is no way to extend authOptions defined in firebaseui.ts.

As a work around I have modified authOptions like:

microsoft: {
  provider: "microsoft.com",
  loginHintKey: "login_hint",
  ...(process.env.REACT_APP_MS_AUTH_TENANT && process.env.REACT_APP_MS_AUTH_CLIENT_ID ? {
    customParameters: {
      tenant: process.env.REACT_APP_MS_AUTH_TENANT,
      clientId: process.env.REACT_APP_MS_AUTH_CLIENT_ID
    }
  } : undefined)
}

I am keen to submit a PR for this, but think my solution is a bit hacked in. If you could consider a better way to implement such a feature, I am more than happy to refactor it and submit a PR

Cheers

cjsewell avatar Apr 01 '23 02:04 cjsewell

Hi @cjsewell, we are open for PR. Feel free to contribute and let us know when it's ready for review. Thank you.

bofeiw avatar May 10 '23 10:05 bofeiw