php - Using auth0 with Laravel 5.3 -


i trying use auth0 laravel 5.3. wrote following code

<script src="https://cdn.auth0.com/js/lock/10.2/lock.min.js"></script> <script type="text/javascript">   var lock = new auth0lock('m0pdpk3bukwyuhzk3lxx8cweftu0qv2x', 'foysal.auth0.com', {     auth: {       redirecturl: 'http://127.0.0.1/addbook/auth0/callback',       responsetype: 'code',       params: {         scope: 'openid email' // learn scopes: https://auth0.com/docs/scopes       }     }   }); </script> 

here callback settings in auth0

enter image description here

but while trying login got below error

enter image description here

could 1 issue ??

i might wrong here, think should define variables in route. way keep url's nice , clean.

route::get('auth0/callback/{code}', ['as' => 'logincallback', 'uses' => '\auth0\login\auth0controller@callback']); 

since it's 404, try above code , instead of doing ?code=xxx add code after callback/ (suggest try both url's)

this javascript make sure url valid:

<script src="https://cdn.auth0.com/js/lock/10.2/lock.min.js"></script> <script type="text/javascript">    var lock = new auth0lock('m0pdpk3bukwyuhzk3lxx8cweftu0qv2x', 'foysal.auth0.com', {    auth: {       redirecturl: '{!!route('logincallback') !!}',       responsetype: 'code',       params: {         scope: 'openid email'       }     }   }); </script> 

also, unless have cors errors in console, there no cors errors. if stumble on them later it's because using 127.0.0.1 cause issues. in case should use localhost instead.


Comments

Popular posts from this blog

php - isset function not working properly -

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -