Azure / Azure/AzureAuth

Debugging when Authenticating from Shiny

Open
#80 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
R
Stars
48
Forks
23
Avg merge
4h 2m
Merged PRs (30d)
3

Description

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](https://github.com/Azure/AzureAuth/assets/138037081/abe89ab8-1fcd-40fb-9d1f-408d694134cd)

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.