i'm trying implement login satellizer twitter. i'm following examples on satellizer repository, on client-side following:
$auth.authenticate('twitter') .then(function (res) { console.log(res); });
and on server-side follow login flow oauth 1.0:
client: open popup window via $auth.authenticate('provider name'). client: unlike oauth 2.0, cannot go directly authentication screen without valid request token. client: oauth 1.0 flow starts request /auth/provider inside popup. server: check if url contains oauth_token , oauth_verifier parameters. sever: not, send oauth signed post request /request_token url. server: redirect /authenticate url valid request token.
but, when redirect /authenticate url cors error:
no 'access-control-allow-origin' header present on requested resource. origin therefore not allowed access.
i looked on example php/laravel , use redirect, me not working.
how can solve problem?
you need add access-control-allow-origin header in index.php file. in server side open index.php , add line after <?php
:
header("access-control-allow-origin: *");
Comments
Post a Comment