If you are interacting with R within a browser (applies to RStudio Server, Posit Workbench, Posit Cloud, and Google Colaboratory), you need a variant of this flow, known as out-of-band auth ("oob") or pseudo-oob. If this does not happen automatically, you can request it explicitly with use_oob = TRUE or, more persistently, by setting an option via options(gargle_oob_default = TRUE).
This should go on to say something about how to get pseudo-oob vs conventional, by using a web client.
This should go on to say something about how to get pseudo-oob vs conventional, by using a web client.