{"id":23401888,"url":"https://github.com/godofbrowser/axios-refresh-multiple-request","last_synced_at":"2025-04-11T19:12:53.967Z","repository":{"id":44017744,"uuid":"212708486","full_name":"Godofbrowser/axios-refresh-multiple-request","owner":"Godofbrowser","description":"A simple project to demonstrate how to simultaneously refresh tokens for unauthorized requests sent in parallel (especially useful in single-page applications)","archived":false,"fork":false,"pushed_at":"2024-11-17T12:59:23.000Z","size":660,"stargazers_count":34,"open_issues_count":7,"forks_count":12,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T15:08:13.367Z","etag":null,"topics":["api-client","axios","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Godofbrowser.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}},"created_at":"2019-10-04T00:39:57.000Z","updated_at":"2025-03-17T00:39:27.000Z","dependencies_parsed_at":"2023-02-06T22:01:50.586Z","dependency_job_id":null,"html_url":"https://github.com/Godofbrowser/axios-refresh-multiple-request","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Godofbrowser%2Faxios-refresh-multiple-request","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Godofbrowser%2Faxios-refresh-multiple-request/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Godofbrowser%2Faxios-refresh-multiple-request/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Godofbrowser%2Faxios-refresh-multiple-request/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Godofbrowser","download_url":"https://codeload.github.com/Godofbrowser/axios-refresh-multiple-request/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248465346,"owners_count":21108244,"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","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":["api-client","axios","javascript"],"created_at":"2024-12-22T11:19:58.697Z","updated_at":"2025-04-11T19:12:53.946Z","avatar_url":"https://github.com/Godofbrowser.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Axios refresh multiple parallel requests\n\n\u003e This project was developed in response to feedback and discussions on this [gist](https://gist.github.com/Godofbrowser/bf118322301af3fc334437c683887c5f) \n\n**Background:** \nWhen the index page loads, you may encounter two alert dialogs. These are triggered by unauthorized request errors, caused by attempts to access the API with an invalid token. The application then automatically initiates a refresh token request to retrieve a new authentication token. Once the new token is obtained, the previously failed requests are retried with the updated credentials. Upon successful execution, the requested data is retrieved and seamlessly displayed on the webpage.\n\nYou can tweet [@godofbrowser](https://twitter.com/Godofbrowser) if you need to ask a question about this \n\n## Installation\n \n### Clone the repository\n```\ngit clone https://github.com/Godofbrowser/axios-refresh-multiple-request.git\n```\n\n### Install dependencies\n```\nnpm i\n\n// or \n\nyarn\n```\n\n### Start the build\n```\nnpm run dev\n\n// or \n\nyarn dev\n```\n\n### Start the demo api server\n```\nnpm run serve\n\n// or \n\nyarn serve\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodofbrowser%2Faxios-refresh-multiple-request","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgodofbrowser%2Faxios-refresh-multiple-request","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgodofbrowser%2Faxios-refresh-multiple-request/lists"}