firebase icon indicating copy to clipboard operation
firebase copied to clipboard

OAuth redirect stuck in loop (Microsoft)

Open BilboBaagins opened this issue 1 year ago • 5 comments

Hey John,

If I modify the code on your example app to launch with redirect instead of popup with Microsoft as the service provider, the auth seems to get stuck in a loop.

It works perfect with launch(flow = "popup").

Same behaviour is experienced when specifying the TENANT_ID, fyi.

Two reprex below, the first is a successful log in with popup and the second is unsuccessful login with redirect.

# reprex 1) working with popup

library(shiny)
library(firebase)

ui <- fluidPage(
  useFirebase(), 
  firebaseUIContainer()
)

server <- function(input, output){
  f <- FirebaseOauthProviders$
    new()$ 
    set_provider("microsoft.com")$
    launch(flow="popup") # works 
}

shinyApp(ui, server)
# reprex 2) not working with redirect

library(shiny)
library(firebase)

ui <- fluidPage(
  useFirebase(), 
  firebaseUIContainer()
)

server <- function(input, output){
  f <- FirebaseOauthProviders$
    new()$ 
    set_provider("microsoft.com")$
    launch(flow="redirect") # doesn't work, gets stuck in loop
}

shinyApp(ui, server)

Thanks again for a really great package!

BilboBaagins avatar Mar 16 '23 14:03 BilboBaagins