I am trying to use the shinyMobile
package to implement a login page before the actual app. However, I am not sure how to use updateF7Login
, f7Login
and f7LoginServer
to check if the user gave the right user name and password. In my example I am assuming only one user in my database, which is stored in the object correct.login
. I tried to use observeEvent()
with no success.
library(shiny)
library(shinyMobile)
shinyApp(
ui = f7Page(
f7Login(id = "loginPage", title = "Welcome"),
f7SingleLayout(
navbar = f7Navbar(
title = "TITLE",
hairline = FALSE,
shadow = TRUE
)%>% f7Align("center"),
# main content
f7BlockTitle(
title = HTML(paste("Welcome", textOutput("user"))),
size = "large"
) %>% f7Align("center")
)
),
server = function(input, output, session) {
loginData <- moduleServer(f7LoginServer, id = "loginPage")
print(loginData)
correct.login <- c("user"="user1", "password"="thepass")
# TODO?
}
)
Any ideas to make this work?