Description Usage Arguments Value See Also Examples
Creates a random character code
1 | createCode(seed = NULL, num = 20)
|
seed |
The seed for random code. |
num |
Number of characters in code. |
A random string of digits and characters.
Shortcut using doAuthMacro
.
Other authentication functions: authReturnCode
;
doAuthMacro
;
shinygaGetTokenURL
;
shinygaGetToken
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 | ## Not run:
securityCode <- createCode()
shinyServer(function(input, output, session)){
AuthCode <- reactive({
authReturnCode(session, securityCode)
})
output$AuthGAURL <- renderUI({
a("Click Here to Authorise Your Google Analytics Access",
href=shinygaGetTokenURL(securityCode)
)
})
AccessToken <- reactive({
validate(
need(AuthCode(), "Authenticate To See")
)
access_token <- shinygaGetToken(code = AuthCode())
token <- access_token$access_token
})
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.