diff --git a/client/components/utilities/token-provider.jsx b/client/components/utilities/token-provider.jsx index 1788707..951282a 100644 --- a/client/components/utilities/token-provider.jsx +++ b/client/components/utilities/token-provider.jsx @@ -47,13 +47,12 @@ const TokenProvider = props => { //save the new auth stuff (setting bearer as well) const newAuth = await response.json(); - setAccess(newAuth.accessToken); - setRefresh(newAuth.refreshToken); + setAccessToken(newAuth.accessToken); + setRefreshToken(newAuth.refreshToken); bearer = newAuth.accessToken; //BUGFIX: logging out correctly requires the new refresh token if (url == `${process.env.AUTH_URI}/logout`) { - console.log(`logging out with refresh token: ${newAuth.refreshToken}`) return fetch(`${process.env.AUTH_URI}/logout`, { method: 'DELETE', headers: {