-
Notifications
You must be signed in to change notification settings - Fork 26
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
fix: allow firebase auth to be enabled independent of crashlytics #2727
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following #2634 the auth config was updated to assume enabled if a provider was included. I think likely we can do the same of initialising firebase if a config is provided and avoid confusion of default enabled
states which in some cases are true
and others are false
I might even be tempted to suggest offering a disabled
override if there is good reason for an author to provide config but not enable the functionality (more just for firebase config which encompassed multiple services, and likely just crashlytics as the auth is configured within the auth provider)
Do you think that sounds sensible? Ideally I want a way to avoid overuse of enabled: true
and enabled: false
settings
Thanks @chrismclarke, that definitely sounds sensible (I was a bit rushed in making this PR initially so hadn't thought it through). I've updated the PR and description.
I haven't acted on this as I wasn't quite sure where you're suggesting the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional test passed
@chrismclarke Could you confirm whether your requested changes have been addressed? From my perspective this is ready to merge. |
Sorry for the delay, this one has been on my backlog for a while and aware it has some conflicts with #2742 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delay reviewing.
I still felt it was a little weird to have the top-level firebase config required but then child app config optional and crashlytics config again enforced so I've added a tidying commit with ab11339
Now the deployment-level firebase config is entirely optional, however if an author includes then the child app config is required. Crashlytics is then also an optional, opt-in feature. Further down the line we might want to provide more configuration options both within the firebase config (e.g. advanced crashlytics, auth or analytics config), but for now I think this looks fine for mostly just managing the crashlytics service
Feel free to go ahead and merge if happy @jfmcquade - or tag me for re-review if you want me to change anything
Thanks @chrismclarke, the changes look good so I'm happy to merge |
PR Checklist
Description
Currently the firebase service initialises if and only if a firebase config is provided at the deployment config level (
config.firebase.config
) and at least one feature is explicitlyenabled
in the firebase deployment config property (e.g.config.firebase.crashlytics.enabled
). This PR removes the second condition, so that the firebase service initialises if and only if a firebase config is provided.This means that, for example, the
auth
feature can be enabled with firebase as a provider, without explicitly setting any further properties of the firebase deployment config beyond providing afirebaseConfig
file.Git Issues
Closes #
Screenshots/Videos
If useful, provide screenshot or capture to highlight main changes