Login widget not rendering, universal login with custom domain

Hi,

We are getting a blank screen instead of the login page. This started happening today. Inspect element shows this where Auth0 header should render
<script src="URL_TO_YOUR_ASSET" async="" defer="" integrity="ASSET_SHA"></script>

Console log error

identifier:1 Refused to execute script from 'https://xxx.xxx.xx/u/login/URL_TO_YOUR_ASSET' because its MIME type ('text/plain') is not executable, and strict MIME type checking is enabled.

Resetting page template to default did not help

<!DOCTYPE html>
<html>
  <head>
    {%- auth0:head -%}
  </head>
  <body>
    {%- auth0:widget -%}
  </body>
</html>

Any ideas what could be the issue?

Thanks!

2 Likes

Hi @spdeveloper

Welcome back to the Auth0 Community!

You issue could be either caused by the fact that the script that you are trying to execute could point to a different file type then the one expected, it hits a cross origin error. Alternatively, the file that it was pointing to could also be completely missing.

Since you have reset the template to the default and the issue still persists, it might require us to review a HAR file and I encourage you to open a support ticket at https://support.auth0.com/. HAR files are automatically sanitized on upload in the support center. They will be able to better assist you with this error if it still persists.

Kind Regards,
Nik

It looks to be related to the custom domain. I reverted configuration changes in our application to use auth0 domain instead of custom domain, and the login appeared. No changes made in Auth0 tenant.

Thanks for letting us know @spdeveloper !

If you have any other questions, feel free to leave a reply or post on the community!

Kind Regards,
Nik

I ran into the same issue and had to open an Urgent support ticket about it. It seems the issue revolves around a beta experience for managing custom layouts (that are only available via custom domains).

If you fire up the CLI tool and choose advanced mode it switches your prompt from standard right into advanced without warning and it puts some default configuration with required variables as place holders.

The solution here is to change the rendering mode from “advanced” to “standard” and delete all other keys in the javascript object.

So basically just paste this into the file that opened in notepad:

{
  "rendering_mode": "standard"
}

Then next time make sure you don’t choose advanced mode or else it will brick you again.

FWIW now that I understand the concepts around this the CLI IS descriptive (it says choose Rendering Mode), but to the lay person it feels like these choices represent two different UI tools (one being raw javascript and the other being a UI) which is 100% not the case.

The inconsistency here is that once you’ve chosen advanced, choosing standard won’t change the rendering mode to standard. You have to choose advanced and then manually change the key defined above to standard.

The reason turning off custom domain worked is because only the custom domain supports page template customizations. You can actually use your custom domain and the auth0 hosted url implementations side by side and the auth0 hosted url will not reflect your page template changes.

Thank you for the additional info on the matter @TheMuffinMan!

In case anyone will need this in the future, I will leave the following documentation regarding Auth0 CLI and rendering mode for anybody who might find it useful!

Kind Regards,
Nik

We just ran into the exact same issue that broke our login experience. In my opinion, the CLI is poorly designed. Not only the issue that @TheMuffinMan mentioned, but also the CLI doesn’t showcase what’s the current rendering mode. When we tweaked the setting and changed back to standard, we couldn’t verify anywhere if the setting takes effect. If selecting “advanced” again, it shifts the rendering mode immediately.

1 Like

When using the CLI I think it says it saves advanced mode changes when you save the file that opens up and then close the file.

Also, FWIW the CLI is still a beta tool. Previously, the way you’d check the rendering mode is to use the API.

Thank you @TheMuffinMan , that solved the issue I was facing!

Please make this clear to the user. I was setting up another tenant and by mistake updated one of the older tenants. It was very difficult to find out the root cause.

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