Closed markmarijnissen closed 4 years ago
@markmarijnissen We usually see that error when your app is not running on a secure origin (localhost
or using HTTPS). Although, we added some handling to throw a proper error when this occurs - are you using an older version of the library?
Yes, I was running it from an insecure origin.
First, I used the version in the documents. (The vanilla Javascript Quickstart, as documented when you create a new Application in the Auth0 dashboard).
Then, I figured the library might be outdated so I found this Github repo. I followed instructions, there, which pointed to also to an outdated version.
Finally, with your suggestion, I found the latest 1.2.3 (using unpkg.com) for a quick prototype. Indeed, I now see the secure origin error.
Thanks @markmarijnissen. Glad you got it sorted and will begin opening PRs for the incorrect documentation that you found. Thanks for letting us know!
Following instructions, when I call
loginWithRedirect()
the promise throws an error.https://github.com/auth0/auth0-spa-js/blob/master/src/utils.ts#L112
See https://www.dropbox.com/s/7l3g8yqpozvhfpb/Screenshot%202019-09-18%2012.36.46.png?dl=0