Leisure seed silhouette: how to use a social provider?
https://github.com/merle-/silhouette-rest-seed
I'm trying to use this as I don't want to use scala.html template files and it seemed to do exactly what I wanted. I can CURL create a user and get a token, but I don't know what to do with the redirect when trying to authenticate with a social provider like Facebook. There seem to be no instructions either. Any help would be appreciated.
source to share
The readme takes you to the point where you logged in a user and with the POST credentials the X-Auth-Token was received. After a bit of debugging, you'll send a POST request to the auth / link route to link the user with the returned X-Auth-Token to the social provider, as in:
http :9000/auth/link/facebook 'accessToken=xxxxx' X-Auth-Token:tokenfromearlier
Note that the httpie syntax is specific and must use = for json and: for headers. You get accessToken from here: https://developers.facebook.com/tools/access_token/
This will return the following JSON:
{
"message": "link with social completed!",
"status": "ok"
}
Not sure how to go about the next step, which is to call / auth / signin / facebook POST as it requires the ISP id and I am still figuring out the fb diagram access approach.
source to share