Start a new topic

Backbone Social Login

Hi, I have follow the steps in http://devcenter.kinvey.com/backbone/tutorials/how-to-implement-safe-signin-via-oauth



Then I try to make a example, following http://devcenter.kinvey.com/backbone/guides/users#usingsocialidentities and nothings happens



I have zero knowledge in Backbone, so here is my JS implementation (simple, just to test)



var promise = Kinvey.init({

appKey : 'kid_xxxxxxxx',

appSecret : 'xxxxxx'

});



promise.then(function(activeUser) {

console.log('keys are ok')

var user = new Kinvey.Backbone.User();



var promise = user.connect('facebook', {

success: function(model, response, options) {

console.log('facebook ok')

},

error: function(error) {

console.log('Some error')

}

});

}, function(error) {

console.log('error')

});



I'm running the script on latest Chrome for Mac



Thanks

No, as long as you run the app in a web server (i.e. accessing using http), you should be fine.
Nevermind, I found the problem. I was trying the script locally and Access-Control-Allow-Origin was blocking it.



When an mobile app is written in backbone I'll have the same problem?



Thanks
![](https://c3409409.ssl.cf0.rackcdn.com/kinvey.vanillaforums.com/editor/0m/nhktzi4vhahg.png "")

Did the authentication pop-up open at all? If it did, can you supply me with your actual app id so I can take a deeper look?
Yes, I have added the business login as a hook in Users, and added the keys for facebook/twitter in oauth in data store.



I used the http://baas.kinvey.../app_id for the callback from Facebook/Twitters, is this right?



I don't get any errors, only "keys are ok" on console and nothing more.



Thanks!
Are you getting any messages/errors in any of the callback functions? Just to confirm, you added both the business logic for OAuth and the related social apps keys in datastore?
Login or Signup to post a comment