AzureAuth icon indicating copy to clipboard operation
AzureAuth copied to clipboard

Debugging when Authenticating from Shiny

Open rtucker8 opened this issue 1 year ago • 1 comments

I am building a Shiny app for my organization and plan to use AzureAuth to authenticate users. This is my first time using AzureAuth, and I have found little help with it elsewhere on the internet.

My app has separate global.R, server.R, and UI.R components. I tried to follow the "Authenticating from Shiny" vignette, however I am receiving an uninformative error and nothing more is produced in the error logs of the Shiny server.

image

I added components to the server and ui functions as outlined in the vignette and defined tenant, app, resource, and redirect in my global.R file. I also included the following at the top (from Authenticating from Shiny Vingette):

clean_url_js <- sprintf(
  "
  $(document).ready(function(event) {
  const nextURL = '%s';
  const nextTitle = 'My new page title';
  const nextState = { additional information: 'Updated the URL with JS' };
  // This will create a new entry in the browser's history, without reloading
  window.history.pushState(nextState, nextTitle, nextURL);
  });
  ", redirect
)

Do you have any tips for debugging?

Thank you in advance.

rtucker8 avatar Jun 28 '23 16:06 rtucker8

Did you get the token (locally)?

PhilippPro avatar Apr 26 '24 05:04 PhilippPro