OAuth2 Facebook authentication

Hi All

I have gone through information regarding handling OAuth2 in client side with the required api format like making a request using code and secret key to obtain a token from FB(in this case). But I am not clear as to how to handle this from my server written in golang.

Steps –

!. User clicks on Login using FB.
2. This launches a pop-up where user is asked to login with credentials of FB.
3. On successful login, the server mention in url of API(server api) receives code. This code is exchanged for token.

My issue –

This leads to processing the login as failed. I noticed that the response was collected as follows in client side written in Angular–
Object { data: null, status: -1, headers: headersGetter/<(), config: Object, statusText: “” }

So why am I posting it here? Because I believe I am doing something wrong in the server side as I see my client side proper as per the doc for satellizer which I am using here in the client side for FB OAuth2 login support.
My question is, ‘What is the server supposed to do here and in which of the steps above?’ . What should be the response from the server to the client to say that authentication succeeded or not? I suppose response should be something in json. Currently I am not doing anything as of it and olny using the token obtaiined to collect user data which is succeeding.
Thanks a ton in advance.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.