Hi All
Can anyone explain to me the flows for facebook login in Angular?
When the login using facebook is clicked on, pop-up comes for email and password,ie FB credentials. Once authorized there, this is the link to which a GET request is seen going. Not sure why the /signup is chosen for the GET request. Why that particular url? Is this done by the FB api? Seems like I will need to handle this GET request from my server. But how am I required to respond to this? I am trying to integrate FB login to my app.
http://localhost:3002/signup?code=#someCodeThis is my config in Angular --
$authProvider.httpInterceptor = function() { return true; },
$authProvider.withCredentials = false;
$authProvider.tokenRoot = null;
$authProvider.baseUrl = '/';
$authProvider.loginUrl = '/auth/login';
$authProvider.signupUrl = '/auth/signup';
$authProvider.unlinkUrl = '/auth/unlink/';
$authProvider.tokenName = 'token';
$authProvider.tokenPrefix = 'satellizer';
$authProvider.tokenHeader = 'Authorization';
$authProvider.tokenType = 'Bearer';
$authProvider.storageType = 'localStorage';
$authProvider.facebook({
clientId: '#someID',
name: 'facebook',
url: '
http://localhost:3002/register',
authorizationEndpoint: '
https://www.facebook.com/v2.5/dialog/oauth',
redirectUri: '
http://localhost:3002/signup/',
requiredUrlParams: ['display', 'scope'],
scope: ['email'],
scopeDelimiter: ',',
display: 'popup',
oauthType: '2.0',
popupOptions: { width: 580, height: 400 }
});
Currently I need to use url of my server at port 3002 waiting for register POST request.
Thanks. Any help would be appreciated.