diff --git a/components/quickConnect/QuickConnect.bs b/components/quickConnect/QuickConnect.bs index 5c0edefe..7558f86b 100644 --- a/components/quickConnect/QuickConnect.bs +++ b/components/quickConnect/QuickConnect.bs @@ -10,8 +10,16 @@ sub monitorQuickConnect() authenticated = checkQuickConnect(m.top.secret) if authenticated = true - m.top.authenticated = 1 - else - m.top.authenticated = -1 + 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 diff --git a/components/quickConnect/QuickConnect.xml b/components/quickConnect/QuickConnect.xml index 5bc03520..b55693fd 100644 --- a/components/quickConnect/QuickConnect.xml +++ b/components/quickConnect/QuickConnect.xml @@ -4,5 +4,6 @@ + \ No newline at end of file diff --git a/components/quickConnect/QuickConnectDialog.bs b/components/quickConnect/QuickConnectDialog.bs index 5676c3ef..84386f67 100644 --- a/components/quickConnect/QuickConnectDialog.bs +++ b/components/quickConnect/QuickConnectDialog.bs @@ -14,11 +14,13 @@ sub quickConnectStatus() m.quickConnectTimer.control = "stop" m.checkTask = CreateObject("roSGNode", "QuickConnect") m.checkTask.secret = m.top.quickConnectJson.secret + m.checkTask.saveCredentials = m.top.saveCredentials m.checkTask.observeField("authenticated", "OnAuthenticated") m.checkTask.control = "run" end sub sub OnAuthenticated() + m.checkTask.control = "stop" m.checkTask.unobserveField("authenticated") ' Did we get the A-OK to authenticate? @@ -26,28 +28,18 @@ sub OnAuthenticated() if authenticated < 0 ' Still waiting, check again in 3 seconds... authenticated = 0 - m.checkTask.observeField("authenticated", "OnAuthenticated") m.quickConnectTimer.control = "start" else if authenticated > 0 - ' We've been given the go ahead, try to authenticate via Quick Connect... - authenticated = AuthenticateViaQuickConnect(m.top.quickConnectJson.secret) - if authenticated <> invalid and authenticated = true - currentUser = AboutMe() - session.user.Login(currentUser, m.top.saveCredentials) - session.user.LoadUserPreferences() - LoadUserAbilities() - m.top.close = true - m.top.authenticated = true - else - m.top.close = true - m.top.authenticated = false - end if + ' We've been logged in via Quick Connect... + m.top.close = true + m.top.authenticated = true end if end sub sub quickConnectClosed() m.quickConnectTimer.control = "stop" if m.checkTask <> invalid + m.checkTask.control = "stop" m.checkTask.unobserveField("authenticated") end if m.top.close = true