Supplying the region to connect_db allows one to connect to the region specific endpoint for snowflake. Tested this change by building and running the web-ui docker image, I was able to login using oauth to the SnowAlert web ui to my snowflake account located in us-east-1.
Before these changes, I was not able to login using oauth as the web ui was hitting the default region endpoint (mydemo.snowflakecomputing.com) rather than (mydemo.us-east-1.snowflakecomputing.com).
Construct the snowflake hostname i.e.
{account}.snowflakecomputing.com
or{account}.{region}.snowflakecomputing.com
following the snowflake documentation for multiple regions. Inspired by https://github.com/snowflakedb/snowflake-connector-python/blob/e2d835d6e574e7e1856e60e703d9b5f8826e369a/src/snowflake/connector/connection.py#L686-L688Supplying the region to connect_db allows one to connect to the region specific endpoint for snowflake. Tested this change by building and running the web-ui docker image, I was able to login using oauth to the SnowAlert web ui to my snowflake account located in us-east-1.
Before these changes, I was not able to login using oauth as the web ui was hitting the default region endpoint (mydemo.snowflakecomputing.com) rather than (mydemo.us-east-1.snowflakecomputing.com).