Skip to content

Commit

Permalink
Merge pull request #137 from dinukadesilva/gh-135-fix-refresh-token
Browse files Browse the repository at this point in the history
Gh 135 fix refresh token
  • Loading branch information
isururanawaka authored Sep 3, 2021
2 parents ba4ea99 + 1b31dae commit 5cb772a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "airavata-custos-portal",
"version": "0.1.4",
"version": "0.1.5",
"private": true,
"main": "src/lib/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/service/custos-service/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export default class CustosService {
const {config, response: {status}} = error;
const originalRequest = config;

if (status >= 0) {
if (status >= 400) {
await this.identity.getTokenUsingRefreshToken();
originalRequest.headers['Authorization'] = `Bearer ${this.identity.accessToken}`;
return axios(originalRequest);
Expand Down

0 comments on commit 5cb772a

Please sign in to comment.