Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/stale authenticator reference for external SSO connection caching #918

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,11 @@ declare module 'snowflake-sdk' {
*/
validateDefaultParameters?: boolean;

/**
* The option to enable connection caching. Should be used along with `credentialCacheDir`
*/
clientStoreTemporaryCredential?: boolean;

/**
* The option to set the location where the token will be saved for the token authentication (MFA and SSO).
* The path must include the folder path only.
Expand Down
2 changes: 1 addition & 1 deletion lib/connection/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ function Connection(context) {
}

// Get authenticator to use
const auth = services.sf.getAuthenticator();
const auth = Authenticator.getAuthenticator(connectionConfig, context.getHttpClient());

try {
await initEasyLogging(connectionConfig.clientConfigFile);
Expand Down