Describe the bug
We recently upgraded from version 17.1.0 to 43.0.0 and noticed that when you create a new SquareClient without a token specifically for using the OAuth API (like we did in the past) it throws an exception. "Please pass in token or set the environment variable SQUARE_TOKEN." This wasn't required in the past.
Expected behavior
I expected a SquareClient to be created without an access token to make use of the OAuth API.
To Reproduce
Steps to reproduce the bug:
- Create a new client without an access token and no SQUARE_TOKEN environment variable configured
- See exception
var client = new SquareClient(clientOptions: new ClientOptions { BaseUrl = "..." }); // this throws
await client.oAuthApi.ObtainTokenAsync(...); // code we were hoping to run to get an access token.
Screenshots
If applicable, add screenshots to help explain the bug.
Square SDK version
For example: 43.0.0
Additional context
We got around this issue by just entering an empty string as the token.
var client = new SquareClient(string.Empty, clientOptions: new ClientOptions { BaseUrl = "..." });
Describe the bug
We recently upgraded from version 17.1.0 to 43.0.0 and noticed that when you create a new SquareClient without a token specifically for using the OAuth API (like we did in the past) it throws an exception. "Please pass in token or set the environment variable SQUARE_TOKEN." This wasn't required in the past.
Expected behavior
I expected a SquareClient to be created without an access token to make use of the OAuth API.
To Reproduce
Steps to reproduce the bug:
Screenshots
If applicable, add screenshots to help explain the bug.
Square SDK version
For example: 43.0.0
Additional context
We got around this issue by just entering an empty string as the token.