jf-roku/components/quickConnect/QuickConnect.bs
2024-01-13 21:04:46 -05:00

26 lines
671 B
Plaintext

import "pkg:/source/api/userauth.bs"
import "pkg:/source/api/baserequest.bs"
import "pkg:/source/utils/config.bs"
sub init()
m.top.functionName = "monitorQuickConnect"
end sub
sub monitorQuickConnect()
authenticated = checkQuickConnect(m.top.secret)
if authenticated = true
loggedIn = AuthenticateViaQuickConnect(m.top.secret)
if loggedIn
currentUser = AboutMe()
session.user.Login(currentUser, m.top.saveCredentials)
session.user.LoadUserPreferences()
LoadUserAbilities()
m.top.authenticated = 1
return
end if
end if
m.top.authenticated = -1
end sub