fixer-m / snowflake-db-net-client

Snowflake .NET Client
Apache License 2.0
51 stars 14 forks source link

Renewing session fails with 'Authentication token has expired. The user must authenticate again.' #35

Closed errosan closed 1 year ago

errosan commented 1 year ago

I am using Snowflake.Client with IServiceCollection.AddHttpClient<TClient>. There are times when my service has been idle for long periods and the next Snowflake.Client API call fails with 'Authentication token has expired. The user must authenticate again.'

According to Snowflake, the master authentication token has an expiration of 4 hours. After 4 hours of inactivity, the token can no longer be used for session renewal. Clients must re-authenticate in order to receive a new master token.

In addition to automatic session renewal, it would be great if Snowflake.Client also supported automatic re-authentication when session renewal fails.

fixer-m commented 1 year ago

That's a nice improvement. Thank you for this contribution!

errosan commented 1 year ago

Do you have an idea when you'll be updating the NuGet package?

fixer-m commented 1 year ago

@errosan Just published new version