Hi Morgan,
That CancellationToken has nothing to do with OAuth2. In OAuth2 you have the concept of access token and refresh token. This is something used in C# to cancel an asynchronous method invocation. A database query is executed asynchronously, so you have that CancellationToken in the call stack.
The error you're getting is actually a timeout. This could be due to different things:
1) A firewall is preventing the connection to the PostgreSQL server, so the query fails with a timeout.
2) The query returns too much data, or takes a lot of time to execute on the server, and then it takes too long to get the response and you have that timeout error.
You need to understand which is the case. If it's a slow query, you will need to improve it to make it run faster, maybe you need to add some index to your databaseT