Auth0 Home Blog Docs

Receiving "cross origin login not allowed" with custom login & angular 1

angular
cors

#1

I did the following:

  1. Created a SPA client and added http://localhost:3000 to Allowed Origins (CORS)

  2. Create a simple angular 1.6 SPA app

  3. Called the following and receiving the error - “cross origin login not allowed”

    angularAuth0.login({
        username: vm.credentials.username,
        password: vm.credentials.password,
        realm: "Username-Password-Authentication"
    }, function (err, result) {
        console.log(err);
        console.log(result);
    });

#2

What version of Auth0.js are you using?


#3

Same goes for me…


#4

Make sure you have enabled this under `Client -> Settings -> Advanced -> Oauth (tab)

![alt text][1]


#5

The “Cross Origin Authentication” toggle is not available in Client -> Settings -> Advanced -> Oauth (tab)![alt text][1]


#6