JohnCoene / firebase

Google FIrebase for shiny
https://firebase.john-coene.com
GNU Affero General Public License v3.0
170 stars 26 forks source link

Error : Cannot find configuration file, see `firebase_config` even if I set the environment variables. #19

Closed can-taslicukur closed 2 years ago

can-taslicukur commented 2 years ago
Sys.setenv(FIREBASE_API_KEY="xxx")
Sys.setenv(FIREBASE_PROJECT_ID="xxx")
Sys.setenv(FIREBASE_AUTH_DOMAIN="xxx")
Sys.setenv(FIREBASE_APP_ID="xxxx")
Sys.setenv(FIREBASE_STORAGE_BUCKET="xxx")
Sys.setenv(FIREBASE_STORAGE_BUCKET="xxx")

library(shiny)
library(firebase)

ui <- fluidPage(
  useFirebase(), # import dependencies
  firebaseUIContainer(),
  plotOutput("plot")
)

server <- function(input, output){
  f <- FirebaseUI$
    new()$ # instantiate
    set_providers( # define providers
      email = TRUE, 
      google = TRUE
    )$
    launch() # launch

  output$plot <- renderPlot({
    f$req_sign_in() # require sign in
    plot(cars)
  })
}

shinyApp(ui, server)

I want to build a shiny app that uses Firebase authentication. However i dont want to use config file since its not secure to do so. So, I set environment variables as instructed in the documentation (https://firebase.john-coene.com/guide/config/) . However when i run the above code, i still get the Error : Cannot find configuration file, see `firebase_config error.

JohnCoene commented 2 years ago

Can you share your version of Firebase?

can-taslicukur commented 2 years ago

I installed it today by running install.packages("firebase") and running packageVersion('firebase') returns ‘0.2.1’

JohnCoene commented 2 years ago

I don't think I have that on CRAN yet, you'll need the development version from Github for this to work, sorry.

JohnCoene commented 2 years ago

Did that work?

JohnCoene commented 2 years ago

I'm going to assume it worked and close. Please reopen if it still does not work.