{"id":15443087,"url":"https://github.com/dariowskii/refresh-token-interceptor","last_synced_at":"2025-10-14T05:33:26.109Z","repository":{"id":242218003,"uuid":"804005772","full_name":"dariowskii/refresh-token-interceptor","owner":"dariowskii","description":"A Refresh Token Interceptor implementation example, also with Riverpod!","archived":false,"fork":false,"pushed_at":"2024-06-01T15:57:48.000Z","size":3408,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-14T05:33:24.453Z","etag":null,"topics":["flutter","jwt","refresh-token","riverpod","token"],"latest_commit_sha":null,"homepage":"https://medium.com/@dariovarrialeapps/how-to-create-a-refresh-token-interceptor-in-flutter-with-dio-64a3ab0be6fa","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/dariowskii.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,"zenodo":null}},"created_at":"2024-05-21T19:19:03.000Z","updated_at":"2025-09-25T07:16:51.000Z","dependencies_parsed_at":"2024-06-01T13:16:56.805Z","dependency_job_id":"b6a4b79a-0d5a-49b0-b3d9-1cd586abff45","html_url":"https://github.com/dariowskii/refresh-token-interceptor","commit_stats":null,"previous_names":["dariowskii/refresh-token-interceptor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dariowskii/refresh-token-interceptor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariowskii%2Frefresh-token-interceptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariowskii%2Frefresh-token-interceptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariowskii%2Frefresh-token-interceptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariowskii%2Frefresh-token-interceptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dariowskii","download_url":"https://codeload.github.com/dariowskii/refresh-token-interceptor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dariowskii%2Frefresh-token-interceptor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018009,"owners_count":26086235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["flutter","jwt","refresh-token","riverpod","token"],"created_at":"2024-10-01T19:33:09.680Z","updated_at":"2025-10-14T05:33:26.085Z","avatar_url":"https://github.com/dariowskii.png","language":"Dart","readme":"# RefreshTokenInterceptor\n\nA Flutter package that provides an interceptor for Dio that automatically refreshes the token when it expires.\n\nIn this example there are two implementations of the interceptor, a simple one and one with Riverpod.\n\nThis example is related to my article on Medium: [How to create a RefreshTokenInterceptor in Flutter (with Dio)](https://medium.com/@dariovarrialeapps/how-to-create-a-refresh-token-interceptor-in-flutter-with-dio-64a3ab0be6fa)\n\n![demo image](./assets/demo.gif)\n\n## Getting Started\n\nFirst, you need to install the dependencies:\n\n```bash\nflutter pub get\n```\n\nThen, choose a device and run the project:\n\n```bash\nflutter run\n```\n\n---\n\nInside the `main.dart` file, you can see that you can choose between the two implementations of the interceptor.\n\n```dart\nvoid main() {\n  // runApp(const MyApp()); -\u003e Simple implementation\n  runApp( // Riverpod implementation\n    const ProviderScope(\n      child: MyAppRiverpod(),\n    ),\n  );\n}\n```\n\nBy default, the `MyAppRiverpod` is being used, but you can change it to `MyApp` to use the simple implementation.\n\nMade with ❤️ by [Dario Varriale](https://www.linkedin.com/in/dario-varriale/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdariowskii%2Frefresh-token-interceptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdariowskii%2Frefresh-token-interceptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdariowskii%2Frefresh-token-interceptor/lists"}