Hey everyone! I’m facing an issue where my GoogleCredentials work perfectly fine on my local machine but don’t on the server. I’m using the following code:
InputStream credentialsStream = createJsonFile(keyFileStream);
GoogleCredentials credentials = GoogleCredentials.fromStream(credentialsStream)
.createScoped(
Collections.singletonList("https://www.googleapis.com/auth/devstorage.full_control")
);
Problem:
Anyone else faced this issue or have any solutions?
Hi @devmanish,
You are using GoogleCredentials successfully on your local machine, but it doesn't work on the server and the code snippet you provided seems to be functioning correctly on the local machine. Also I’ve taken note that you're not getting an error or a credentials object on the server.
Here are the potential causes and solutions that might help with your concern:
If the workarounds above don't work, you can contact Google Cloud Support for a more in-depth analysis. When contacting them, please provide comprehensive details and include screenshots. This will help them better understand and address your issue.
I hope the above information is helpful.