An instance of this class handles the 'polished' user sessions for each 'shiny' app using 'polished'. The 'shiny' developer should not need to interact with this class directly.
config()
polished Sessions configuration function
Sessions$config( firebase_config = NULL, admin_mode = FALSE, is_invite_required = TRUE, sign_in_providers = "email", is_email_verification_required = TRUE, is_auth_required = TRUE )
This function is called via global_sessions_config()
in global.R
of all Shiny apps using polished.
sign_in_social()
verify the users Firebase JWT and store the session
Sessions$sign_in_social(firebase_token, hashed_cookie)
firebase_token
the Firebase JWT. This JWT is created client side
(in JavaScript) via firebase.auth()
.
hashed_cookie
the hashed polished cookie. Used for tracking the user session. This cookie is inserted into the "polished.sessions" table if the JWT is valid.
NULL if sign in fails. If sign in is successful, a list containing the following:
email_verified
is_admin
user_uid
hashed_cookie
session_uid
get_invite_by_email()
Sessions$get_invite_by_email(email)
find()
Sessions$find(hashed_cookie, page)
sign_in_email()
Sessions$sign_in_email(email, password, hashed_cookie)
register_email()
Sessions$register_email(email, password, hashed_cookie)
refresh_email_verification()
Sessions$refresh_email_verification(session_uid, firebase_token)
set_signed_in_as()
Sessions$set_signed_in_as(session_uid, signed_in_as, user_uid = NULL)
get_signed_in_as_user()
Sessions$get_signed_in_as_user(user_uid)
set_inactive()
Sessions$set_inactive(session_uid, user_uid)
sign_out()
Sessions$sign_out(hashed_cookie)
get_admin_mode()
Sessions$get_admin_mode()
clone()
The objects of this class are cloneable with this method.
Sessions$clone(deep = FALSE)
deep
Whether to make a deep clone.