Comments (7)
Can you show the relevant section of your waterlock.config file please :)
from waterlock-facebook-auth.
here you are :)
{
name: "waterlock-facebook-auth",
appId: "**********************",
appSecret: "**********************",
redirectUri: 'http://localhost:1337/auth/facebook_oauth2',
fieldMap: {
'name': 'name',
'first_name': 'first_name',
'last_name': 'last_name',
'email': 'email',
'facebookId': 'id'
}
And /models/Auth.js
name: {
type: 'string'
},
first_name: {
type: 'string'
},
last_name: {
type: 'string'
},
email: {
type: 'string'
},
facebookId: {
type: 'integer'
}
from waterlock-facebook-auth.
strange... here is mine and it definitely works:
fieldMap: {
'name': 'name',
'email': 'email'
}
I'll double check in a couple of hours when I've left work and get back to you but I'm pretty sure this stuff works...
from waterlock-facebook-auth.
hi wayne :)
do you checked it ?
and i have another question
fieldMap: {
'first_name': 'first_name',
'email': 'email'
}
it store first_name in Auth model . and i want store it User model
how i can do it
thanks advanced :)
from waterlock-facebook-auth.
Could it be related to https://developers.facebook.com/blog/post/2015/07/08/graph-api-v2.4/ ?
Fewer default fields for faster performance: To help improve performance on mobile network connections, we've reduced the number of fields that the API returns by default. You should now use the
?fields=field1,field2
syntax to declare all the fields you want the API to return.
Now I have to modify the getMe
method in fboauth2.js
to return more fields I wanted.
from waterlock-facebook-auth.
Now I have to modify the getMe method in fboauth2.js to return more fields I wanted.
It would be nice if the requested scope
had a good default, but could be overridden in waterlock.js
from waterlock-facebook-auth.
What is the solution?
My waterlock code is:
{
name: "waterlock-facebook-auth",
appId: APPI_ID,
appSecret:'APP_SECRET',
fieldMap: {
'Picture':'picture',
'Cover':'cover',
'gender': 'gender'
}
},
but only name and facebookid are returned
in auth.js I have:
attributes: require('waterlock').models.auth.attributes({
/* e.g.
nickname: 'string'
*/
firstName: 'string',
lastName: 'string',
gender: 'string',
timezone: 'number',
Picture:'string',
Cover:'string'
The google+ picture is returned so it does work there.
from waterlock-facebook-auth.
Related Issues (9)
- Home page video HOT 1
- How can i authenticate against Facebook when i already have the access_token? HOT 4
- User is registered twice HOT 2
- Retrieve facebook fields
- Doubt over prefix sails with facebook waterlock
- Should this work? HOT 4
- facebookId attribute too long for waterline integer HOT 2
- pluralizeEndpoints does not work HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from waterlock-facebook-auth.