I created authentication like this
DirectusApiManager directusApiManager = DirectusApiManager(
baseURL: "https://control.seedkurdistan.org",
saveRefreshTokenCallback: (refreshToken) async {
// Create storage
var storage = ref.read(flutterSecureStorageProvider);
await storage.write(key: refreshStorage, value: refreshToken);
},
loadRefreshTokenCallback: () async {
var storage = ref.read(flutterSecureStorageProvider);
var token = await storage.read(key: refreshStorage);
// now if token is expired, we can load it from storage
return token;
});
but still when the token expire it will not automatically use the new one the app crash but if i close and open the app work again
I created authentication like this
but still when the token expire it will not automatically use the new one the app crash but if i close and open the app work again