We have Facebook authentication integrated into our User Accounts system (nodejs, express) using everyauth.
What is done now (in pseudo code):
everyauth
.facebook
.appId('....')
.appSecret('.....')
.findOrCreateUser(
function (session, accessToken, accessTokenExtra, fbUserMetadata) {
...
}
.redirectPath('/internal/facebook');
Authentication works perfectly.
The issue is when going through this flow:
User does not have Facebook cookies for his User Agent now (User is
not logged in into Facebook).
User invokes authentication via Facebook (/auth/facebook service of everyauth is called)
- Facebook "Login/Sign in" page is loaded. User wants to create new facebook account and select "Sign up for Facebook".
- User finishes with registration details and then should confirm his Facebook account registration via our App by clicking the link in the mail he just received.
- So user goes to his mail, click the link and -
he is redirected to the root - "/" - of our User-Account. - which is a web-service with no UI that provides User-Account service to different application...
Questions are following :
- How can we get the user after he is signed up for Facebook via our Application? findOrCreateUser() is not called in this scenario.
- How can we override the behavior of redirecting to "/" of our App after user is signed up to Facebook via our App (after successful user registration)?