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