# Passwordless Cors and/or https requirements?

**URL:** <https://community.auth0.com/t/passwordless-cors-and-or-https-requirements/19455>\
**Category:** Get Help\
**Tags:** passwordless-sms, passwordless-email, passwordless\
**Created:** [December 29, 2018, 6:27pm UTC](https://community.auth0.com/t/passwordless-cors-and-or-https-requirements/19455 "2018-12-29T18:27:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dapug](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dapug/32/9219_2.png) [@dapug](https://community.auth0.com/u/dapug)\
**Post date:** [December 29, 2018, 6:27pm UTC](https://community.auth0.com/t/passwordless-cors-and-or-https-requirements/19455/1 "2018-12-29T18:27:49Z")

</div>

My application (Vue.js / SPA) requires **passwordless** auth and I’m trying to test out a **simple hello-world** to no avail. I’ve gone through all the docs, set up my code as shown here:

> **[Auth0.js - Auth0 Docs](https://auth0.com/docs/libraries/auth0js)**
>
> How to install, initialize and use Auth0.js

I get my auth code via SMS successfully, but when calling **passwordlessLogin** (), I get this error in Chrome:

> Access to XMLHttpRequest at ‘[https://mysite.auth0.com/co/authenticate](https://mysite.auth0.com/co/authenticate)’ from origin ‘[http://localhost:8080](http://localhost:8080)’ has been **blocked by CORS policy** : Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource

Same issue whether using Custom UI or Lock. Also same issue whether using HTTPS or even a custom domain/host on my local machine ([https://example.com:8080](https://example.com:8080))

And of course, don’t ask: yes I have my URL ([http://localhost:8080](http://localhost:8080)) set as a Callback in my Application Settings, and also in the **Allow Origins CORS** section (supposedly redundant, but whatev).

Pulling hair out, wasting hours… what am I missing???

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [December 29, 2018, 6:51pm UTC](https://community.auth0.com/t/passwordless-cors-and-or-https-requirements/19455/2 "2018-12-29T18:51:47Z")

</div>

You mention you added the origin `http://localhost:8080` in the **Allowed Callback URLs** and in the **Allow Origins (CORS)** (they are not redundant) but I have to ask… Did you add the origin to the **Allowed Web Origins** setting? That’s the one required for the Cross-Origin Authentication (`/co/authenticate`) protocol to work.

---

<div class="post-metadata">

**Author:** ![dapug](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dapug/32/9219_2.png) [@dapug](https://community.auth0.com/u/dapug)\
**Post date:** [December 29, 2018, 7:55pm UTC](https://community.auth0.com/t/passwordless-cors-and-or-https-requirements/19455/3 "2018-12-29T19:55:32Z")

</div>

Holy cow. Total noob, yes, that was it. I obviously knew the importance of setting the URLs in there, but I was hyper-focused the one labeled “CORS” and not the “Web” origins.

Thanks.

Now to figure out how to disable “consent” when the login is made from my known domain, 1st-party app…

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [December 29, 2018, 8:24pm UTC](https://community.auth0.com/t/passwordless-cors-and-or-https-requirements/19455/4 "2018-12-29T20:24:55Z")

</div>

Take a look [here](https://auth0.com/docs/api-auth/user-consent#skipping-consent-for-first-party-applications), but you can’t skip the consent dialog if using `localhost`.

---

<div class="post-metadata">

**Author:** ![dapug](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dapug/32/9219_2.png) [@dapug](https://community.auth0.com/u/dapug)\
**Post date:** [December 29, 2018, 9:51pm UTC](https://community.auth0.com/t/passwordless-cors-and-or-https-requirements/19455/5 "2018-12-29T21:51:28Z")

</div>

Wow, yes, that would have been a head scratcher regarding `localhost`.

I tried it by setting a local custom domain as a test and indeed, the consent screen was skipped!

Many thanks!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [January 28, 2019, 9:51pm UTC](https://community.auth0.com/t/passwordless-cors-and-or-https-requirements/19455/6 "2019-01-28T21:51:32Z")

</div>

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