Linkng of application with business.facebook.com - facebook

If we add an existing application (24 February 2014), for authorization in our web project in business.facebook.com, will id users registered on our website via the application remain the same or new id (id that returned for us)? Currently returning global user id. If the new id will return users can somehow compare global id with a new id, whatever registered users could continue without problems enter the site under your account?
Thanks.

Related

How can I send the student to moodle course URL with auto-login at Moodle interface

We are setting up a learning platform with Moodle. We have an existing student portal and want to send students to Moodle to attend the courses (course will be listed in the student profile in our project).
How can I send the student to moodle course URL and auto-login? Ideally, when students enter the module we don't want he/she don't' navigate away unaware, insted just finish the course (we may show the course in an iframe or popup).
We need to login via API or some other means because we wish the student to continue if he/she is reattempting.
How do students log into the existing student portal?
Could you use SSO?
CAS and LDAP are built into Moodle
https://docs.moodle.org/38/en/Managing_authentication
I would also recommend the SAML2 plugin, developed by Catalyst
https://moodle.org/plugins/auth_saml2
You might also be able to use LTI. So a user can access a course from your student portal without needing to log in.
https://docs.moodle.org/38/en/LTI_and_Moodle

Merging Users in Kinvey

Situation:
User A registers an account in our application and logs in.
For what ever reason logs out.
Logs in to the application again using Facebook social sign on with an account that has the same email associated with it as the
original registration had.
A second account is created for this sign on and 2 accounts exist in the system.
How can I merge these accounts into a single account during the social sign on (by querying for the existence of that email) automatically or with User Collection Business Hooks (if with business hooks, can you please provide an example of how I would do this as documentation online is unclear for this specific purpose).
Notes:
Kinvey backend
Phonegap with facebook plugin
Jquery mobile
Wish to merge accounts or find existing account and add social identity to it during sign on
Assume I cannot delete users
Preferably achieve this step with a PreSave Kinvey Business Logic Hook
Cheers,
I managed to create my own custom end point to basically achieve user merging.
If a user exists with a kinvey account, then tries to log in using facebook with an email address matching a kinvey user, I used the following end point code to add a social identity to the existing user before attempting to log in using that user (This function only worked because we maintain a guest login for users not logged in to the system).
Hope this helps some one.
function onRequest(request, response, modules) {
var users = modules.collectionAccess.collection('user');
var social = request.body.social;
users.findAndModify({"username":request.body.email},{$set:{"_socialIdentity":social}},
function(err,result){
if(err){
response.error(err);
response.complete();
}else{
if(!result._id){
response.body = {message:"No User Found Matching This Email"};
response.complete();
}else{
response.body = {message:"User Was Hopefully Updated"};
response.complete();
}
}
});
}

SigninwithIntuit with multiple user of the same QuickBook Company

I've successfully Integrated my application with QuickBook Online. I successfully implemented DirectConnectToIntuit, SigninWithIntuit, Disconnect scenario and Test according to https://developer.intuit.com/docs/#api/deki/files/3143/recipe_for_review_success.pdf. I have a situation with DirectConnectToIntuit, SigninWithIntuit for multiple user. Consider the SigninWithIntuit scenerio:
When a first user comes, they click SigninWithIntuit in my application, add their username and password, authorize by Intuit and comeback in my site. As the user is new and his email address is not in my database, I show him the account creation form. When this user submits the form after filling it in then I the create database entry, create the user etc, then login and show ConnectToQuickBook button(G. in the above doc). Everything is OK up to now.
When another user is created in the same QuickBooks online company, then this new user clicks on SignInWithIntuit in my application, and they come back to my app after authorization. For this user, I will not show the account Creation form, I just create this new user and assign as a user of the previous created company, login and show the ConnectToIntuit button. But how can I determine the company of the user? I don't have an access token or access token secret yet to do that.
It is answered here (Intuit's live community) -
https://intuitdeveloper.lc.intuit.com/questions/1188167-signinwithintuit-with-multiple-user-of-the-same-quickbook-company?jump_to=answer_2643393

How to get Users unique Id at the time of logging JasperReports Server?

Please tell me if there is any method through which I can get the users unique id who logged into the JasperReports Server, and that id could be used in the report to display only those records matching this id.
Is there any parameter which can be referred or any other work around to obtain the logged in user id or any other way to deal with the issue.

Integrate social network login however authenticate using existing credentials

We are looking to integrate Facebook, Google, Twitter into an existing site.
Unlike most implementations, the user MUST be a customer prior being able to login with Facebook, Google, etc. The current database design is as follows;
userid | username | password | customerno
So the idea is if a user decides to login using Facebook, we need to validate that they are also an existing customer using their customer number which is alphanumeric. Once authenticated, they are no longer required to authenticate using their customer number. If they are not yet a customer, they will first need to create an account with us.
Do I need to design a new table for each provider? If so what should the design look like?
How do I authenticate a user who has logged in using Facebook with their existing customer number?
How do I authenticate a user who has logged in using Facebook with their existing customer number?
That depends on what criteria you have to recognize someone as a customer …
IMHO the best and easiest way to connect Facebook users to existing accounts on some other page is the email address. If you don’t have that, and see no other reliable way to identify someone as a customer with the data that Facebook can provide – then maybe you could just ask the user for their customer id on your site before connecting their Facebook account.
As for your database design – if you read the email address on every connect/login, then you could just look that up to find your user id. Otherwise, you could either add extra fields to your existing user table, where you save someone’s Facebook/Google/... user id. But if you want to use multiple services, maybe it’d be better to put this data into a second table like
userid | foreign_user_id | type
where type would be one of 'facebook', 'google' etc. to identify the login provider that foreign_user_id comes from.