rstudio / pins-r

Pin, Discover and Share Resources
https://pins.rstudio.com
Other
301 stars 62 forks source link

Verify Connect url on board creation #763

Open hadley opened 11 months ago

hadley commented 11 months ago

To avoid redirects after the fact. Will (presumably need) https://github.com/rstudio/rsconnect/issues/944.

hadley commented 11 months ago

OTOH I can't reproduce it with this code:

library(pins)

key <- Sys.getenv("COLORADO_CONNECT")

board1 <- board_connect(server = "https://colorado.posit.co/rsc", key = key)
board1 |> pin_write(1:10, name = "hadley/test-1")
board1 |> pin_write(1:11, name = "hadley/test-1")

board2 <- board_connect(server = "https://colorado.rstudio.com/rsc", key = key)
board2 |> pin_write(1:10, name = "hadley/test-2")
board2 |> pin_write(1:11, name = "hadley/test-2")

I get a 403 when writing to board2, possibly some url mismatching in the auth layer. I have rsconnect 1.0.1.

...

Oh but maybe that's because key based auth follows a different path.

aronatkins commented 11 months ago

This may be related to https://github.com/rstudio/rsconnect/issues/939, which is reporting a "necessary data rewind wasn't possible" error.