Comments (2)
Yes you can just replace all the conditions that wait for credentials()$user_auth
to be TRUE
before activating with your own custom condition that included the date predicate.
credentials <- callModule(shinyauthr::login, "login",
data = user_base,
user_col = user,
pwd_col = password_hash,
sodium_hashed = TRUE,
log_out = reactive(logout_init()))
logout_init <- callModule(shinyauthr::logout, "logout", reactive(credentials()$user_auth))
user_info <- reactive({credentials()$info})
my_condition <- reactive({
# all returns TRUE only if both conditions are TRUE
all(credentials()$user_auth, user_info()$enddate > Sys.Date())
})
observe({
if(my_condition()) {
shinyjs::removeClass(selector = "body", class = "sidebar-collapse")
} else {
shinyjs::addClass(selector = "body", class = "sidebar-collapse")
}
})
output$welcome <- renderText({
req(my_condition())
glue("{user_info()$name}")
})
from shinyauthr.
It works. Thanks!
from shinyauthr.
Related Issues (20)
- About loginUI title Simple Chinese does not work HOT 8
- Additional info in the login box HOT 2
- Background and text colour HOT 1
- Issue adding a loading icon/spinner HOT 1
- live example app down? HOT 3
- CRAN submission HOT 3
- How to enable password coding by setting "sodium_hashed" parameter? HOT 2
- Reload session when logging out? HOT 14
- Error object 'js' not found HOT 8
- Error in shiny::isTruthy: attempt to apply non-function HOT 2
- Option to bypass/deactivate the login
- Error: shinyjs: Error parsing the JavaScript code provided. HOT 1
- shinydashboard shows app without login using shinyauthr HOT 1
- White font color on login button is difficult to see HOT 3
- login error after shiny timeout HOT 4
- Beautify the login window suggestion HOT 3
- Where should I put the data for my own app in shinyboard? HOT 1
- Cases for help HOT 2
- Using shinyauthr with shiny rmarkdown documents HOT 1
- Log password failures HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shinyauthr.