What's going on:
I have a backend server where I have the information of each individual user. Twitter and Facebook authentication is a common way of letting the user access one's application nowadays, so it was decided that he/she should be able use those platforms + the classic way (email + password)
The question:
After an user as logged in using Facebook and I receive a call back stating that it was successfully (for example with the SDK):
- (void)sessionStateChanged:(FBSession *)session
state:(FBSessionState) state
error:(NSError *)error
{
switch (state) {
case FBSessionStateOpen:
if (!error) {
// We have a valid session
NSLog(@"User session found");
}
break;
case FBSessionStateClosed:
case FBSessionStateClosedLoginFailed:
[FBSession.activeSession closeAndClearTokenInformation];
break;
default:
break;
}
How is it possible to pass now the credentials to the server, in order to access our own endpoints?
How can the backend know that this specific user that is making a request is in fact authenticated (or registered) in your backend?
What role does the app we create on facebook side (https://developers.facebook.com/apps/) has in this?