tryRestoreAuth method
Running the application at startup will automatically re-authenticate the user.
onLoad is executed and isSignedIn is returned.
Therefore, it returns true
if you are signed in with the loaded credentials.
アプリ起動時に実行することで自動的に再認証を行ないます。
onLoadが実行され、isSignedInが返されます。
そのため読み込んだ認証情報でサインインされていればtrue
を返します。
Implementation
Future<bool> tryRestoreAuth() async {
await _initialize();
await onLoad?.call(this);
final current = _data._getCurrent();
_activeId = current.get(userIdKey, nullOfString) ?? _registeredCurrentId;
return isSignedIn;
}