Skip to contents

Shiny module

oauth_module_server()
OAuth 2.0 & OIDC authentication module for Shiny applications
use_shinyOAuth()
Add JavaScript dependency to the UI of a Shiny app

S7 classes

OAuthProvider()
OAuthProvider S7 class
OAuthClient()
OAuthClient S7 class
OAuthToken()
OAuthToken S7 class

OAuth provider configuration

Generic

oauth_provider()
Create generic OAuthProvider
oauth_provider_oidc()
Create a generic OpenID Connect (OIDC) OAuthProvider
oauth_provider_oidc_discover()
Discover and create an OpenID Connect (OIDC) OAuthProvider

Preconfigured

oauth_provider_auth0()
Create an Auth0 OAuthProvider (via OIDC discovery)
oauth_provider_github()
Create a GitHub OAuthProvider
oauth_provider_google()
Create a Google OAuthProvider
oauth_provider_keycloak()
Create a Keycloak OAuthProvider (via OIDC discovery)
oauth_provider_microsoft()
Create a Microsoft (Entra ID) OAuthProvider
oauth_provider_okta()
Create an Okta OAuthProvider (via OIDC discovery)
oauth_provider_slack()
Create a Slack OAuthProvider (via OIDC discovery)
oauth_provider_spotify()
Create a Spotify OAuthProvider

OAuth client configuration

oauth_client()
Create generic OAuthClient

Authentication flow

Prepare & handle OAuth 2.0 calls; typically not needed by end users

prepare_call()
Prepare a OAuth 2.0 authorization call and build an authorization URL
handle_callback()
Handle OAuth 2.0 callback: verify state, swap code for token, verify token

Token methods

Methods for OAuthToken objects

get_userinfo()
Get user info from OAuth 2.0 provider
refresh_token()
Refresh an OAuth 2.0 token
introspect_token()
Introspect an OAuth 2.0 token
client_bearer_req()
Build an authorized httr2 request with Bearer token

Miscellaneous

is_ok_host()
Check if URL(s) are HTTPS and/or in allowed hosts lists
error_on_softened()
Throw an error if any safety checks have been disabled
custom_cache()
Create a custom cache backend (cachem-like)