You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use popup mode from a local html file (file:///.../sample.html), authentication appears to work correctly, but the popup window remains open, with message "Login was successfulPlease close this tab to continue".
When closing the popup, a server error is reported by the callback, originated from https://github.com/auth0/auth0.js/blob/master/lib/LoginError.js#L31. When debugging, this is actually called from the popup window (xxx.auth0.com/login/callback) with the message "User closed the popup window".
So, first problem is that we get a "Server error" when the error is cause by "User closed the popup window". But there is another problem before: the automatic window closing fails, reporting an invalid origin (null value) with stack trace:
Uncaught SyntaxError: Failed to execute 'postMessage' on 'Window': Invalid target origin 'null' in a call to 'postMessage'.
doPost @ callback?state=Q9IE2CiZcZxavVqD&code=4/8rmDyM5lhQ17h2BW1QKoB6UHVmHXAZbI39hPwTNp3PU:394
(anonymous function) @ callback?state=Q9IE2CiZcZxavVqD&code=4/8rmDyM5lhQ17h2BW1QKoB6UHVmHXAZbI39hPwTNp3PU:416
resolve @ callback?state=Q9IE2CiZcZxavVqD&code=4/8rmDyM5lhQ17h2BW1QKoB6UHVmHXAZbI39hPwTNp3PU:117
(anonymous function) @ callback:521(anonymous function) @ callback?state=Q9IE2CiZcZxavVqD&code=4/8rmDyM5lhQ17h2BW1QKoB6UHVmHXAZbI39hPwTNp3PU:414
This is all probably cause by an invalid origin (the local file, file:///) but since is not properly handled the errors are very misleadings. When the file is served from a http server, there is a message correctly indicating an incorrect origin.
The text was updated successfully, but these errors were encountered:
nicosabena
changed the title
Using popup mode from local file cause misleading error
Using popup mode from local file causes misleading error
Mar 27, 2016
When trying to use popup mode from a local html file (
file:///.../sample.html
), authentication appears to work correctly, but the popup window remains open, with message "Login was successful Please close this tab to continue".When closing the popup, a
server error
is reported by the callback, originated from https://github.com/auth0/auth0.js/blob/master/lib/LoginError.js#L31. When debugging, this is actually called from the popup window (xxx.auth0.com/login/callback) with the message "User closed the popup window".So, first problem is that we get a "Server error" when the error is cause by "User closed the popup window". But there is another problem before: the automatic window closing fails, reporting an invalid origin (null value) with stack trace:
This is all probably cause by an invalid origin (the local file, file:///) but since is not properly handled the errors are very misleadings. When the file is served from a http server, there is a message correctly indicating an incorrect origin.
The text was updated successfully, but these errors were encountered: