switch token script to implicit flow and fix interceptor hanging Future

The script used authorization code flow (response_type=code) which produces
tokens expiring in ~4 hours, while the app uses implicit flow (~60 days).
Switched the script to implicit flow to match, removing the client_secret
requirement and token exchange step.

Also fixed UnauthorizedInterceptor swallowing 401 errors without calling
handler.reject(), which left Dio request Futures hanging forever.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Tommy Chow 2026-03-07 20:37:23 -08:00
parent 779572a864
commit 7a9af238b6
2 changed files with 23 additions and 55 deletions

View file

@ -22,8 +22,9 @@ class UnauthorizedInterceptor extends Interceptor {
return;
}
// For other requests, show login dialog and don't propagate
// For other requests, show login dialog and reject so the Future completes
_showLoginDialog();
handler.reject(err);
return;
}