I have a React project that works perfectly fine until I deploy it to Amplify. I have two environments in Amplify — staging
and production
. My environment variables work on staging
, but not one specific variable which pertains to a 3rd party service.
Here are the variables:
staging:
production:
When I redeploy it all, staging works correctly. However, on production, it seems to keep referring to the staging variable:
Which results in an error:
<code>Error: {"code":43,"StatusCode":401,"message":"WS failed with code 43 and reason - JWTAuth error: signature is not valid. Make sure the token is created using the secret for API key "x62jnhxxxxxx"","isWSFailure":false}
</code>
<code>Error: {"code":43,"StatusCode":401,"message":"WS failed with code 43 and reason - JWTAuth error: signature is not valid. Make sure the token is created using the secret for API key "x62jnhxxxxxx"","isWSFailure":false}
</code>
Error: {"code":43,"StatusCode":401,"message":"WS failed with code 43 and reason - JWTAuth error: signature is not valid. Make sure the token is created using the secret for API key "x62jnhxxxxxx"","isWSFailure":false}
I’ve tried to change around the environments and keys to no avail. Am I doing anything wrong here?