Improve authenticated handling
This commit is contained in:
@@ -252,8 +252,7 @@ class TbContext {
|
||||
try {
|
||||
log.debug('onUserLoaded: isAuthenticated=${tbClient.isAuthenticated()}');
|
||||
isUserLoaded = true;
|
||||
_isAuthenticated.value = tbClient.isAuthenticated();
|
||||
if (isAuthenticated) {
|
||||
if (tbClient.isAuthenticated()) {
|
||||
log.debug('authUser: ${tbClient.getAuthUser()}');
|
||||
if (tbClient.getAuthUser()!.userId != null) {
|
||||
try {
|
||||
@@ -269,6 +268,7 @@ class TbContext {
|
||||
homeDashboard = null;
|
||||
oauth2ClientInfos = await tbClient.getOAuth2Service().getOAuth2Clients(pkgName: packageName, platform: _oauth2PlatformType);
|
||||
}
|
||||
_isAuthenticated.value = tbClient.isAuthenticated();
|
||||
await updateRouteState();
|
||||
|
||||
} catch (e, s) {
|
||||
|
||||
@@ -465,7 +465,7 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: HEAD
|
||||
resolved-ref: c2a264d646ebad8ade84abe6c38b78001bd34ed7
|
||||
resolved-ref: a899f22d6cd784c72df7abcf42ff190b9d227ee5
|
||||
url: "git@github.com:thingsboard/dart_thingsboard_client.git"
|
||||
source: git
|
||||
version: "1.0.0"
|
||||
|
||||
Reference in New Issue
Block a user