Getting CORS error on my R-Shiny app configured with shinyproxy and auth0

Hi there.
I am hosting an R-Shiny app with shinyproxy and using auth0 for authentication. But I am getting this CORS error:

Access to manifest at '' (redirected from '') from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

In my auth0 application settings I have,
Allowed callback URLs:,
Allowed logout URLs:
Allowed Web Origins:
Allowed Origins (CORS): https://

I also have custom domain enabled and using Universal login.

Here is my Nginx configuration:

server {
     listen 80;
     listen [::]:80;
     server_name *;
     return 301 https://$host$request_uri;

server {
  listen 443 ssl http2;
  listen [::]:443 ssl http2;
  ssl_certificate /etc/letsencrypt/live/;
  ssl_certificate_key /etc/letsencrypt/live/;
  ssl_trusted_certificate /etc/letsencrypt/live/;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
  ssl_prefer_server_ciphers on;
  ssl_session_cache shared:SSL:50m;
  ssl_session_timeout 1d;
  ssl_session_tickets off;
  ssl_ecdh_curve X25519:sect571r1:secp521r1:secp384r1;

  location / {
    proxy_pass                  ;
    proxy_http_version                    1.1;
    proxy_set_header Upgrade              $http_upgrade;
    proxy_set_header Connection           "upgrade";
    proxy_read_timeout                    600s;
    proxy_redirect                        off;
    proxy_set_header Host                 $http_host;
    proxy_set_header X-Real-IP            $remote_addr;
    proxy_set_header X-Forwarded-For      $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto    $scheme;


Hi @wahiduzzamankhan007,

The reason that you are getting this error is that CORS is not supported at the OAuth 2.0 authorization endpoint. This API is not designed to be called programmatically (for example using xhr or fetch request from Javascript) but only using browser navigation, normally through a redirect.

The general flow is as follows:

  1. Your app performs a browser redirect to
  2. Auth0 will create an authorization code and redirect to
  3. From that page you may then perform a CORS request to to perform the code exchange.

Hope this helps.

1 Like

Thanks for helping on this one @luuuis !

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.