Comments (6)
OK, now I understand exactly what you are saying. Currently if you want to change the whitelist
, you have to repeat it:
whitelist: [
'name',
'username',
'email',
'password',
'confirmPassword',
...
],
I'll work on this for the next version of SuperLogin, but don't know when I'll get to it. If you can do I pull request with a passing test in user.spec.js
then I would be happy to merge it.
from superlogin.
Dont have access to push a new branch, was going to fix another issue i found
from superlogin.
See line 168 of config.example.js for the built-in solution.
Please close if this does what you want it to do.
from superlogin.
I am using the config, however extend does not work how it needs to work in order to make this s function correctly.
Adding any valid to the config user model will result in a error stating that username, password and confirm password is not passed.
from superlogin.
You shouldn't need to use JQuery extend. Anything you put in the config file under userModel
is automatically merged into the model.
if(typeof config.getItem('userModel') === 'object') {
userModel = extend(true, userModel, config.getItem('userModel'));
}
Please explain specifically what you want to do and include some example code so I can understand your situation.
from superlogin.
So what im trying to say is the node extend is basically a clone to jquery extend. And extend will not merge 2 arrays.
So for example, if you were to add this to the config file
userModel: {
whitelist: [
'interests',
'unit',
'age',
'subscribe',
'zipcode'
]
}
You would get an error saying the username, password, and confirmPassword is required. This is because userModel = extend(true, userModel, config.getItem('userModel'));
would return the whitelist array like this
whitelist: [
'interests',
'unit',
'age',
'subscribe',
'zipcode'
]
This is because extend will overwrite the array rather then merge them. But what you really want is a unique merge.
Hope that makes more sense.
from superlogin.
Related Issues (20)
- How can I remove confirmPassword requirement?
- Validation failed HOT 8
- Validation failed HOT 1
- Calling /auth/session with authorization header is returning unauthorized HOT 1
- Use template-literal instead of EJS
- user-db-added event doesn't get emitted HOT 1
- New release? HOT 13
- Validation Failed HOT 1
- Register vaildation failed HOT 18
- Mandatory Migration from Cloudant to BlueMix not compatible with Superlogin HOT 1
- Superlogin with CouchDB crypto.pbkdf2 "digest" argument required HOT 1
- how to add profile data with registration?
- removeUser not working
- Live demo isn't working HOT 1
- Forgot Password function
- TypeError: Cannot read property 'valid' of undefined at Function.PouchDB.parseAdapter
- Howto: use superlogin with current nodejs HOT 6
- Set a Doc create limit per user
- super login spaming console with errors
- Graphql
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 superlogin.