Using firebase configuration in a golem app

51 Views Asked by At

I am new to using golem framework for R shiny app. In my app, I use firebase authentication using the R package firebase. So, I have firebase configuration in a r script fct_helpers.R which is located inside the R folder. Following is provided in configuration:

firebase::firebase_config(api_key = "API KEY",
                          project_id = "ID",
                          app_id = "APP ID",
                          overwrite = TRUE
                          )

When I run golem::run_dev(), the firebase.rds is generated in the app directory and app works fine. But when I do devtools::check(), I get the error:

── Error ('test-golem-recommended.R:55:1'): (code run outside of `test_that()`) ──
Error: Cannot find configuration file, see `?firebase_config`

What do I need to change for the check to pass?

0

There are 0 best solutions below