waterlock / waterlock-facebook-auth Goto Github PK
View Code? Open in Web Editor NEWFacebook authentication for waterlock
Home Page: http://waterlock.ninja/
License: MIT License
Facebook authentication for waterlock
Home Page: http://waterlock.ninja/
License: MIT License
redirect_to=HOST/auth/
should be
redirect_to=HOST/auths/
When the sails js and configured with prefix the same should not be included in the redirectUri default?
var attr = {
facebookId: _data.id,
name: _data.name,
username: _data.name.replace(' ', ''),
email: _data.email
};
when make console.log(attr);
it return email null
please help
and thanks for your response :)
Hi
Following the homepage tutorial video, when I get to the log in and go to /user/jwt I always get an unauthed response. I am logged in via postman and can see in the output "user login success" but going to /user/jwt doesn't work
I can get to /post/restricted however?
Hi,
I've been testing the waterlock facebook module and ran into some issues. This is not necessarily a problem with waterlock-facebook-auth.
The 17 digit facebookId is longer than the default allowed for type=integer using the waterline ORM (for mysql). The result is an incorrect store of the facebookId upon creation of a new user. The initial login and authentication is successful and an entry is created in the Auth table. However, upon logging out and logging back in, the authentication fails because the facebookId is not the correct 17 digit value (truncated as int(11) in mysql).
When using a local disk based storage, the full 17 digit facebookId is stored correctly and the problem does not occur. This is why testing on a default sails install does not reveal the issue. I have not tested on any other databases except mysql, but I suspect that a lack of support for larger integer types will be a problem as well.
My solution was to either:
For development purposes, I chose option 2 since we are constantly changing our models and need to drop the tables. I don't see any checks for int type or mathematical operations on the facebookId so this seems to work.
Performance differences between an int and varchar/char (unique and indexed) seems to be negligible even on millions of records so perhaps changing the facebookId attribute type to string for the facebook-auth module is the best way forward.
I am having a problem with facebook login as the user is registered as a new one again after registering the first time. When I looked at the database I found that the facebook Id is saved in a strange format -> '1.01568e16'. I think that when findOrCreate function is executed it doesn't find the Fb Id saved as retrieved from facebook so it registers a new one.
Another thing is that no attributes from facebook are saved 'email', 'first_name', etc. Please help.
Waterlock config:
fieldMap: {
// : ,
'firstName': 'first_name',
'lastName': 'last_name',
'gender': 'gender',
'timezone': 'timezone'
}
Can anyone have a ganders at this and tell me if I'm right or doing something wrong?
I have a use case where user shall be able to login via mobile(native) facebook app. Facebook iOS sdk will provide the access tokens. How can i authenticate the users via Facebook without again going to facebook to get the user into session?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.