{"id":26768807,"url":"https://github.com/sharmadhiraj/flutter-access-refresh-token-manager-demo","last_synced_at":"2026-04-28T00:32:23.418Z","repository":{"id":215216272,"uuid":"738392452","full_name":"sharmadhiraj/Flutter-Access-Refresh-Token-Manager-Demo","owner":"sharmadhiraj","description":"Efficiently handle access token expiration with a single request, optimizing performance during concurrent API calls.","archived":false,"fork":false,"pushed_at":"2025-08-20T11:10:53.000Z","size":1554,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-20T13:13:36.038Z","etag":null,"topics":["access-token","auth","dart","flutter","http","jwt","mobile-app","refresh-token"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sharmadhiraj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-03T05:55:22.000Z","updated_at":"2025-08-20T11:10:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"36ba4b23-6ef0-4bd9-a5e4-365f91933048","html_url":"https://github.com/sharmadhiraj/Flutter-Access-Refresh-Token-Manager-Demo","commit_stats":null,"previous_names":["sharmadhiraj/flutter-access-refresh-token-manager-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sharmadhiraj/Flutter-Access-Refresh-Token-Manager-Demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharmadhiraj%2FFlutter-Access-Refresh-Token-Manager-Demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharmadhiraj%2FFlutter-Access-Refresh-Token-Manager-Demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharmadhiraj%2FFlutter-Access-Refresh-Token-Manager-Demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharmadhiraj%2FFlutter-Access-Refresh-Token-Manager-Demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharmadhiraj","download_url":"https://codeload.github.com/sharmadhiraj/Flutter-Access-Refresh-Token-Manager-Demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharmadhiraj%2FFlutter-Access-Refresh-Token-Manager-Demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32361477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["access-token","auth","dart","flutter","http","jwt","mobile-app","refresh-token"],"created_at":"2025-03-28T21:35:58.639Z","updated_at":"2026-04-28T00:32:23.402Z","avatar_url":"https://github.com/sharmadhiraj.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter Access Refresh Token Manager Demo\n\n\u003chr/\u003e\n\n🚀 Exciting Announcement: I've developed a Flutter plugin designed to streamline the secure storage\nand efficient management of access and refresh tokens! 🗝️\n\nExplore it\nhere: [Flutter Secure Token Manager](https://pub.dev/packages/flutter_secure_token_manager)\n\nIf you prefer not to use the plugin, you can proceed with this example. Happy coding! 🌟\n\n\u003chr/\u003e\n\nEfficiently handle access token expiration with a single request, optimizing performance during\nconcurrent API calls.\n\n### Demo\n\n![Demo Gif](demo.gif)\n\n### Implementation Guide\n\n1. Copy the `TokenManager` class into your project.\n\n2. If your token structure differs, modify the `Token` class within the `TokenManager` according to\n   your specific requirements.\n\n3. Update the `isTokenExpired` method if your authentication process varies. This method checks if\n   the current token is expired.\n\n4. Modify the `renewAccessToken` method to align with your token renewal logic. This method is\n   invoked when the token expires, and a new token needs to be obtained.\n\n5. Ensure to call the `setToken` method after a successful login or when the app is opened (if the\n   user has an active session). This initializes the token manager with the user's current token.\n\n6. Include the following line in the headers of your API call method to attach the authorization\n   token:\n\n   `\"Authorization\": \"Bearer ${await TokenManager.instance.getAccessToken()}\"`\n\n   This ensures that the authorization header is added to your API calls requiring authentication.\n   It doesn't matter which API client you use (http, dio, or others); make sure this header is\n   included in the request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharmadhiraj%2Fflutter-access-refresh-token-manager-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharmadhiraj%2Fflutter-access-refresh-token-manager-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharmadhiraj%2Fflutter-access-refresh-token-manager-demo/lists"}