-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathREADME.Rmd
More file actions
67 lines (49 loc) · 2.91 KB
/
Copy pathREADME.Rmd
File metadata and controls
67 lines (49 loc) · 2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
output: github_document
md_extensions:
self_contained: true
editor_options:
chunk_output_type: console
---
# <img src="man/figures/login_hex.png" align="right" width="120" align="right" /> login: User Authentication for Shiny Applications
**Author:** Jason Bryer, Ph.D. jason@bryer.org
**Website:** https://jbryer.github.io/login/
<!-- badges: start -->
[](https://github.com/jbryer/login/actions/workflows/R-CMD-check.yaml)
`r badger::badge_devel("jbryer/login", color = "blue")`
`r badger::badge_cran_release("login")`
`r badger::badge_doi('10.5281/zenodo.10987876', color = 'blue')`
<!-- badges: end -->
```{r, echo=FALSE, results='hide', message=FALSE, warning=FALSE, error=FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
library(login)
```
This package provides a framework for adding user authentication to [Shiny](https://shiny.posit.co) applications. This is unique to other authentication frameworks such as [ShinyManager](https://datastorm-open.github.io/shinymanager/) and [shinyauthr](https://github.com/PaulC91/shinyauthr?tab=readme-ov-file) in that it provides tools for users to create their own accounts and reset passwords. This is particularly useful for Shiny applications used to collect data without a pre-existing user management system. User credentials are stored in any database that supports the [DBI](https://dbi.r-dbi.org) interface. Passwords are hashed using MD5 in the browser so that unencrypted passwords are never available to the Shiny server. For an extra layer of security, you can [salt](https://en.wikipedia.org/wiki/Salt_(cryptography)) the password before storing it in the database.
Resources for learning to use the `login` pacakge:
* [Package Website](https://jbryer.github.io/login/)
* [Slides from ShinyConf 2024](https://github.com/jbryer/login/tree/main/inst/slides/login.pdf)
You can install from CRAN:
```{r, eval=FALSE}
install.packages('login')
```
Or to install the latest development version:
```{r, eval=FALSE}
remotes::install_github('jbryer/login')
```
Once installed, there are several demos included:
```{r, eval=FALSE}
# These demonstrate the core login functionality
shiny::runApp(paste0(find.package('login'), '/login_demo_simple/'), port = 2112)
shiny::runApp(paste0(find.package('login'), '/login_template/'), port = 2112)
shiny::runApp(paste0(find.package('login'), '/login_modal/'), port = 2112)
# These demonstrate the user_param_module
shiny::runApp(paste0(find.package('login'), '/user_params/'), port = 2112)
shiny::runApp(paste0(find.package('login'), '/data_viewer/'), port = 2112)
```
## Code of Conduct
Please note that the login project is released with a [Contributor Code of Conduct](https://jbryer.github.io/login/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.