MeltanoLabs / tap-snowflake

Other
4 stars 10 forks source link

Browser authentication token not being cached #49

Open dlouseiro opened 1 day ago

dlouseiro commented 1 day ago

When using the tap with use_browser_authentication=True, I noticed that the browser auth tokens are not being cached, even if one's Snowflake account has token caching enabled.

From my experience, this can be achieved by applying two simple changes:

  1. Use , extras = ["secure-local-storage"] when declaring the snowflake-connector-python as a project dependency (pyproject.toml)
  2. Pass client_store_temporary_credential in connection arguments (mostly important for linux users, as documented here):
    # Enable temporary credential file for Linux users
    # For Linux users, since there are no OS-key-store, an unsecure temporary credential for SSO can be enabled by this option. The default value for this option is False.
    # client_store_temporary_credential = True
edgarrmondragon commented 1 day ago

PRs welcome!

dlouseiro commented 45 minutes ago

PRs welcome!

Here you go @edgarrmondragon!