Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable auth config in .env #1195

Open
cjsewell opened this issue Apr 1, 2023 · 1 comment
Open

Enable auth config in .env #1195

cjsewell opened this issue Apr 1, 2023 · 1 comment
Assignees

Comments

@cjsewell
Copy link

cjsewell commented Apr 1, 2023

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

@bofeiw
Copy link
Contributor

bofeiw commented May 10, 2023

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

@bofeiw bofeiw assigned cjsewell and unassigned shamsmosowi and bofeiw May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants