Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

express-api-user-management-signup

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-api-user-management-signup - npm Package Compare versions

Comparing version 0.0.2 to 0.0.5

.res/webhooks.png

18

app/public.account/js/views/home.js

@@ -31,3 +31,3 @@

// customize the account settings form //
// customize the account settings form //

@@ -43,7 +43,19 @@ $('#account-form h1').text('Account Settings');

// setup the confirm window that displays when the user chooses to delete their account //
// setup the confirm window that displays when the user chooses to delete their account //
hc.initConfirm();
// init dropdown
$('a.dropdown-toggle').dropdown();
// generate form
$.getJSON( $("#metaformurl").attr('value'), {}, function(data){
values = $("#meta").attr('value');
if( !data ) data = {}
data.value = values.length ? JSON.parse( values ) : {}
console.dir(data);
var jsonForm = $("#metaform").jsonForm( data );
// update the hidden input field with jsondata
$('#metaform').on('change keyup', function() {
$("#meta").attr('value', JSON.stringify( jsonForm.getFormValues() ) );
});
});
});

5

package.json
{
"name": "express-api-user-management-signup",
"version": "0.0.2",
"description": "adds user frontend with login / registration features to your (express) application. Startingpoint for DIY api management",
"version": "0.0.5",
"description": "adds user frontend with login-, registration-, and webhook- features to your (express) application. Startingpoint for DIY api management",
"author": {

@@ -20,2 +20,3 @@ "name": "Coder of Salvation"

"jade": "0.27.7",
"mongodb":"2.0.27",
"moment": "1.7.2",

@@ -22,0 +23,0 @@ "emailjs": "0.3.3",

@@ -9,13 +9,16 @@ express-api-user-management-signup

<img src=".res/loggedin.png">
<br><br>
<img src=".res/webhooks.png">
# WARNING: BETA, not production ready
## WARNING: BETA, not production ready
# Install: standalone
## Install: standalone
sudo npm install coffee-script -g
npm install express-api-user-management-signup
WEBHOOKURL="http://localhost:8123" node app.js
# or
WEBHOOKURL="http://localhost:8123" coffee app.coffee
# NON-COFFEESCRIPTERS: coffee -c app.coffee will convert it to app.js
# Install: as library
## Install: as library

@@ -28,11 +31,8 @@ Use it directly in your existing express servercode:

Using the code below, it will add extra routes to your existing express app:
In your existing express-app, just put this above app.listen(....) :
var express = require("express");
var port = process.env.PORT || 8111
var host = process.env.HOST || "127.0.0.1"
var app = express();
require("./usermanagement.js")(app,express);
//>>>>>>>>>>>> BEGIN OF CODE
where usermanagement.js looks something like this:
var config = {

@@ -43,3 +43,9 @@ webhook: {

}
mongo: { dbName: "localhost", dbPort: 27017, dbName: "foo"}
mongo: {
host: "localhost",
port: 27017,
name: "foo"
// user: "foo"
// password: "23kj4"
}
layout: {

@@ -54,14 +60,11 @@ title: {

"Contact": {target:"_blank",url:"mailto:support@foo.com"}
}
},
formurl: "/js/form.json"
}
}
require("coffee-script/register")
require('express-api-user-management-signup/lib')(app,express,webhookurl,requestdata,mongocfg)
module.parent.require("coffee-script/register")
module.parent.require('express-api-user-management-signup/lib')(app,express,config)
//<<<<<<<<<<<< END OF CODE
## Features:
app.listen(....)
# Features:
* coffeescript yay!

@@ -74,8 +77,21 @@ * New User Account Creation

* Blowfish-based Scheme Password Encryption
* extra webhooks for flexibilitystorage (to integrate with api proxy like apiaxle e.g.)
* end-user webhooks
* optional internal webhooks for flexibilitystorage (to integrate with api proxy like apiaxle or emailgateway e.g.)
* logging of db actions
* apikey support + regeneration of apikey
* works standalone and as express drop-in lib (the latter needs improvement eg. app.use)
* flexible form using (optionally remote) jsonschema
#### Webhooks
## Extend forms easily
By using [jsonform](https://github.com/joshfire/jsonform), we can easily extend the form without having to fiddle with database code.
Just have a look at :
* the '[form.json](https://github.com/coderofsalvation/express-api-user-management-signup/blob/master/app/public.account/js/form.json)' in this package
* the [docs](http://github.com/joshfire/jsonform/wiki).
> HINT: you can change the 'formurl'-parameter of 'app.[js,coffee]' (or the json above) into a remote url in order to remotely manage the form
## Webhooks
The following webhooks are fired whenever

@@ -96,9 +112,15 @@

Where configuredhost is defined by you ('http://mygateway.com/foo' e.g.)
These webhooks can be reacted upon by other middle/software in order to
send emails or update api proxy settings e.g.
***
## Todo
####Node-Login is built on top of the following libraries :
* tests
* responsive ui (for smartphone etc)
* url validation for webhook url in jsonschema
* smaller fonts jsonform validation error tooltips (to match the layout)
## Built with
* [Node.js](http://nodejs.org/) - Application Server

@@ -112,5 +134,4 @@ * [Express.js](http://expressjs.com/) - Node.js Web Framework

* [Twitter Bootstrap](http://twitter.github.com/bootstrap/) - UI Component & Layout Library
####Credits
* [braitsch](http://github.com/braitsch) for his node-login boilerplate
* [jsonform](http://developer.joshfire.com/doc/dev/ref/jsonform)
* [underscore](http://documentcloud.github.com/underscore)
* [JSV](https://github.com/garycourt/JSV)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc