Comments (4)
Yes, that should be possible.
You just have to make sure your custom adapter has the same syntax as the other ones, i.e.
// create new user
adapter.save('john', '[email protected]', 'secret', function(err, user) {});
// find user
adapter.find('name', 'john', function(err, user) {});
// update user
adapter.update(user, function(err, user) {});
// remove user
adapter.remove('john', function(err, res) {});
I will then change index.js#L48 and make the adapter configurable. Maybe add another field to exports.db
in config.js
exports.db = {
url: 'postgres://127.0.0.1:5432/',
name: 'users',
collection: 'my_user_table',
adapter: [adapter name]
};
[adapter name]
would be your custom adapter on npm. Does that work for you?
from lockit.
That should work for me. Thanks.
from lockit.
No worries, thank you for the good idea!
I'll put it in the next release.
from lockit.
done - 82289d0
from lockit.
Related Issues (20)
- without email config, strange error HOT 1
- How to run the couchdb example? HOT 5
- Cannot get full example to work HOT 4
- Dependencies still use old version of lockit-sendmail (1.1.0 instead of 1.1.1) HOT 1
- Why is there no unique index on username and email address? HOT 7
- How to set username and password for mongodb connection in lockit config? HOT 1
- When does a login session expire? HOT 5
- how do i know who i am in client (browser side)? HOT 2
- fix email
- Why did you make GET /logout? HOT 1
- Demo Page Error HOT 1
- Use an existing connection to MongoDB
- Document: Anything other than express-generator defaults, and Lockit fails to render
- Document / Implement if needed - More fields for a user signing up
- Document / implement -- Custom error messages
- Option to key/index off of email instead of username
- Cannot find module: lockit-template-blank HOT 1
- Help/Guidance to make an Amazon DynamoDB connector?
- Thanks i love lockit!!!!
- OAuth authentication
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 lockit.