I found vignette on using the AzureAuth package with Shiny which seems to be a modified version of this httr Sketch of shiny + oauth.
It's unclear, to me at least, how to connect the names in that guide to what I can find in my Azure Portal.
That guide asks for tenant, app, resource, and redirect.
I presume that for tenant and app I should use the IDs from here:
For resource, do I leave in the c("https://management.azure.com/.default", "openid")
or do I change it to the endpoints found in the portal, ie. https://login.microsoftonline.com/<tenant_id>/oauth2/v2.0/authorize?
I changed it to just "openid"
.
Should the redirect
variable be the URL of my app, the callback URL or something else?
ie. https://myapp.azurewebsites.net or https://myapp.azurewebsites.net/.auth/login/aad/callback
I'm going with the former. This is all in a docker container using rocker as the base.
With all this I'm getting 500 errors after I authenticate. Of course, Azure has middleware inbetween my container and the exposed internet that is redirecting to their login regardless of anything in my code. The problem is in the handoff from being authenticated to the callback. That's where things seem to break.
Edit: Turns out I was barking up the wrong tree entirely. The problem I was having was this...
Query/headers too large on Azure if auth enabled
R Shiny app on Azure App Services with Active Directory Integration