Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Commit

Permalink
create refresh token interceptor only for oauth2
Browse files Browse the repository at this point in the history
  • Loading branch information
Alif Rachmawadi committed Aug 9, 2019
1 parent e4a3ee3 commit 274ca79
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions templates/winter/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,13 @@ const sendRequest = (
}

const client = axios.create(options);
createAuthRefreshInterceptor(
client,
refreshInterceptor(env, environment.auth.options)
);

if (isAuth(environment, "oauth2")) {
createAuthRefreshInterceptor(
client,
refreshInterceptor(env, environment.auth.options)
);
}

return client.request({
url: destUrl.pathname
Expand Down

0 comments on commit 274ca79

Please sign in to comment.