Skip to content

fix: Allow browser authentication to Snowflake from the Deploy pane#1290

Merged
atheriel merged 1 commit intomainfrom
aj-interactive-in-deploy-pane
Feb 27, 2026
Merged

fix: Allow browser authentication to Snowflake from the Deploy pane#1290
atheriel merged 1 commit intomainfrom
aj-interactive-in-deploy-pane

Conversation

@atheriel
Copy link
Contributor

The snowflakeauth package only permits external browser authentication from interactive contexts, which makes sense in most cases.

However, push-button deployments from the RStudio IDE actually run in a separate Deploy pane, not from the interactive console -- which isn't considered "interactive" by default.

So this commit tells rlang to temporarily treat this as an interactive context, which allows the browser flow to work.

This actually requires a change to the snowflakeauth package as well: posit-dev/snowflakeauth@dbd4830. We'll have to get another release of that package out to enable this fix to work properly.

Fixes #1289.

@atheriel atheriel requested a review from aronatkins January 20, 2026 21:05
@atheriel atheriel force-pushed the aj-interactive-in-deploy-pane branch from b569eb9 to 5cede55 Compare January 23, 2026 19:55
# Detect when we're running in the Deploy pane of RStudio and enable
# "interactive" temporarily so that external browser authentication is
# permitted.
if (rstudioapi::isBackgroundJob()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a mix of calls to base::interactive() and rlang::is_interactive(). Should they all shift to rlang::is_interactive()? Alternatively, should we have our own internal is_interactive() implementation which consults rstudioapi::isBackgroundJob()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this targeted fix is what I'm after for now. Changing how we think about interactive() everywhere might have other side effects.

@atheriel atheriel force-pushed the aj-interactive-in-deploy-pane branch from 5cede55 to e63be0e Compare February 27, 2026 17:02
The `snowflakeauth` package only permits external browser authentication
from interactive contexts, which makes sense in most cases.

However, push-button deployments from the RStudio IDE actually run in a
separate Deploy pane, not from the interactive console -- which isn't
considered "interactive" by default.

So this commit tells `rlang` to temporarily treat this as an interactive
context, which allows the browser flow to work.

Fixes #1289.

Signed-off-by: Aaron Jacobs <aaron.jacobs@posit.co>
@atheriel atheriel force-pushed the aj-interactive-in-deploy-pane branch from e63be0e to 2d1af2c Compare February 27, 2026 17:02
@atheriel atheriel merged commit 591e652 into main Feb 27, 2026
19 checks passed
@atheriel atheriel deleted the aj-interactive-in-deploy-pane branch February 27, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interactive Snowflake authentication doesn't work when deploying from RStudio

2 participants