https://github.com/brucehoff/ShinyOAuthExample
Example of authenticating with Synapse from a Shiny application using the OAuth / Open ID Connect protocol
https://github.com/brucehoff/ShinyOAuthExample
Last synced: 4 months ago
JSON representation
Example of authenticating with Synapse from a Shiny application using the OAuth / Open ID Connect protocol
- Host: GitHub
- URL: https://github.com/brucehoff/ShinyOAuthExample
- Owner: brucehoff
- License: apache-2.0
- Created: 2019-09-23T15:54:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-10T23:56:09.000Z (over 5 years ago)
- Last Synced: 2024-08-13T07:11:18.559Z (8 months ago)
- Language: R
- Size: 10.7 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - brucehoff/ShinyOAuthExample - Example of authenticating with Synapse from a Shiny application using the OAuth / Open ID Connect protocol (R)
README
# ShinyOAuthExample
Example of authenticating with Synapse from a Shiny application using the OAuth / Open ID Connect protocol```r
library(synapser)
library(rjson)
synLogin()
# customize your client name
client_name<-'Shiny OAuth Demo'
client<-list(client_name=client_name, redirect_uris=list('http://127.0.0.1:8100'))
client<-synRestPOST('/oauth2/client', toJSON(client), 'https://repo-prod.prod.sagebase.org/auth/v1')
client_id_and_secret<-synRestPOST(paste0('/oauth2/client/secret/',client$client_id), '', 'https://repo-prod.prod.sagebase.org/auth/v1')```
Now create a text file called `config` in this format:
```
client_id: xxxxx
client_secret: xxxxx
```Finally, run `shiny-oauth-r`.