Auth0 Home Blog Docs

Shiny Auth0 with CloudFlare, SSL?

auth0
shiny

#1

Hi there,

We use auth0 with nginx proxypass like the tutorial explained on https://auth0.com/blog/adding-authentication-to-shiny-server/

We have configured letsencrypt ssl site with ssl redirection.

We have added the site on cloudflare, when we activate Cloudflare CDN, the auth0 doesn’t work.
It stays loading and redirection to shiny app is not done. It works perfectly when the site is not on CDN.

Is this a common problem with auth0? Any idea how to fix it? we didn’t have such problems when we were running the site without auth0.
Thanks!


#2

@fouad.oualid This is most probably an issue with headers or cookies not being forwarded correctly to the shiny proxy, not an issue with Auth0 but with cloudflare + the shiny proxy (shiny-auth0), why do you need a CDN for a shiny server?

I do not understand the logic on why to do that, each time you run a report you’ll be asking for dynamic data, rendering the CDN useless. Assuming you still need it, i do not know the details of how Cloudflare CDN interacts with the proxy, but i’d try checking the configuration of Cloudflare to see if there’s any pass-through that you can apply to avoid headers/cookies to be lost, i know e.g. Cloudfront from Amazon has this.

If that doesn’t work, you can try modifying the proxy to make it work, it’s possible you need to capture the variables differently when using Cloudflare CDN, but i don’t know that really.

Have a nice day!


#3

Thanks for your time. We use it mainly to protect the app against DDOS attacks and stuff.

While you’re here, may I ask another unrelated question? The app always calls back to 311.today/reports, is there a way to make it go back to 311.today ? We tried pointing to / only and didn’t work.


#4

The problem is fixed with deactivating the rocket loader and auto-minify features of CDN.


#5

Just saw your question :slight_smile:
Check shiny-auth0/routes/index.js
Let me know if you need detailed help about this.


#6