On SPA application, callback doesn't work using Ahead-Of-Time compilation

I’ve just started using Auth0 a few days ago. I am building an Angular SPA and everything is working fine during testing on my local machine. However, when I build the app with an Ahead-Of-Time option and load it to a static website the callback doesn’t work.
As an example I loaded your SPA 01-Login demo app on an Azure static hosting location. You can see it here: https://sbswebhosting.z22.web.core.windows.net
When I log in with a local user I get the following:
The requested content does not exist.
HttpStatusCode: 404
ErrorCode: WebContentNotFound
RequestId : 136a5008-501e-0108-0da6-556d50000000
TimeStamp : 2019-08-18T09:22:45.0952612Z

I also tried loading it to a static Bluehost website, which you can see here: http://tsi.mattpenner.info/
When I log in with a local user I get the following:
ERROR Error: Uncaught (in promise): TypeError: Cannot read property ‘digest’ of undefined
TypeError: Cannot read property ‘digest’ of undefined
at M (main-es2015.860e151b67d360b518da.js:1)
at e. (main-es2015.860e151b67d360b518da.js:1)
at main-es2015.860e151b67d360b518da.js:1
at Object.next (main-es2015.860e151b67d360b518da.js:1)
at main-es2015.860e151b67d360b518da.js:1
at new R (polyfills-es2015.93bc1bebc4581dc49064.js:1)
at r (main-es2015.860e151b67d360b518da.js:1)
at e.loginWithRedirect (main-es2015.860e151b67d360b518da.js:1)
at m._next (main-es2015.860e151b67d360b518da.js:1)
at m.__tryOrUnsub (main-es2015.860e151b67d360b518da.js:1)
at P (polyfills-es2015.93bc1bebc4581dc49064.js:1)
at new R (polyfills-es2015.93bc1bebc4581dc49064.js:1)
at r (main-es2015.860e151b67d360b518da.js:1)
at e.loginWithRedirect (main-es2015.860e151b67d360b518da.js:1)
at m._next (main-es2015.860e151b67d360b518da.js:1)
at m.__tryOrUnsub (main-es2015.860e151b67d360b518da.js:1)
at m.next (main-es2015.860e151b67d360b518da.js:1)
at g._next (main-es2015.860e151b67d360b518da.js:1)
at g.next (main-es2015.860e151b67d360b518da.js:1)
at iu._next (main-es2015.860e151b67d360b518da.js:1)

Is it possible to use the Auth0 Universal Login with an Angular AOT site?

Hi @mattpenner,

Welcome to the Auth0 Community Forum!

I noticed that you also submitted a support ticket. Hopefully we can get some answers there and I will update this thread for future users trying to implement and AoT integration with Auth0.

Thanks,
Dan

Looks like this error was associated with an insecure(http) origin.

Glad it got cleared up.

Thanks,
Dan

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