mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-04-20 19:12:04 +00:00
fix OAuth expiration handling in MyAnimeList service
This commit is contained in:
parent
d0723a363a
commit
2abe08cc71
1 changed files with 5 additions and 1 deletions
|
|
@ -44,7 +44,11 @@ class MyAnimeList extends _$MyAnimeList {
|
|||
if (queryParams['code'] == null) return null;
|
||||
|
||||
final oAuth = await _getOAuth(queryParams['code']!);
|
||||
final mALOAuth = OAuth.fromJson(oAuth as Map<String, dynamic>);
|
||||
final mALOAuth = OAuth.fromJson(oAuth as Map<String, dynamic>)
|
||||
..expiresIn =
|
||||
DateTime.now()
|
||||
.add(Duration(seconds: oAuth['expires_in']))
|
||||
.millisecondsSinceEpoch;
|
||||
final username = await _getUserName(mALOAuth.accessToken!);
|
||||
ref
|
||||
.read(tracksProvider(syncId: syncId).notifier)
|
||||
|
|
|
|||
Loading…
Reference in a new issue