Facebook login in silhouette-rest-seed


#1

Hi team,
I have been experimenting with silhouette-rest-seed for sometime.I am a beginner,please help me out and I am not sure if the question looks trivial.
I could successfully send sign in,signup requests from CURL.I am exploring more on Facebook login.

How do we send request from CURL for Facebook sign in/link
POST /auth/signin/:provider
POST /auth/link/:provider

I tried these steps to begin:
1)call SignUp API - works
2)call link(read somewhere that we have to link signed up user for Facebook,so I tried this)-not working
CURL request:
curl http://localhost:9000/auth/link/facebook -H ‘Content-Type:application/json’ -H ‘X-Auth-Token:JWT got during signup’ -d ‘{“accessToken”:"fb accesstoken "}’ -v

response:
< HTTP/1.1 401 Unauthorized

  • Connection #0 to host localhost left intact
    {“status”:“ko”,“error”:“credentials not correct”}

silhouette.conf

Facebook provider

facebook.authorizationURL="https://graph.facebook.com/oauth/authorize"
facebook.accessTokenURL="https://graph.facebook.com/oauth/access_token"
facebook.redirectURL="http://localhost:9000/authenticate/facebook"
facebook.clientID="app client id"
facebook.clientSecret="app cleint secret"
facebook.scope=“email”

Thanks in advance