OKAccounts for NodeJS

OKAccounts for NodeJS

Cart 26 sales


User account management and payments in NodeJs made easy.

Making an app or website, with users and credit card payments? When doing that, not only do you have to code the main thing that your app or site does, but you also have to code user account management and and credit card payment processing logic as well. To say that can be tedious is an understatement, and it will take a lot of steam out of what you really want to focus on.

... Well not any more!

The good news is that OKAccounts provides a starter NodeJs server with all those APIs already built in. Which frees you up to focus your coding efforts on the core functions of your app or site!


  • Sign up
    • With email confirmation
  • Log in
    • Token based authentication
    • Role based authorisation
    • Reusable & extensible middleware
  • Credit card payments
  • Based on APIs
    • JSON responses
    • Ideal for native apps & single page applications
  • Easy to integrate
    • Detailed up instructions provided
    • Descriptive comments to help you understand what is going on
  • Robust, reliable
    • Well tested with comprehensive integration tests and code coverage

What customers say

Tech Stack

  • NodeJs
    • 100% ES6 Javascript Goodness!
  • Koa
    • HTTP Server
  • MongoDb
    • NoSQL Database
  • Stripe
    • Credit Card Payments


What happened to EzAccounts?

EzAccounts used a legacy version on NodeJs (v0.10.x), was written in ES5 Javascript, and used the Express library.

OKAccounts is its successor, and a complete rewrite.

It uses the current LTS version of NodeJs (v4.x.x), and is written is ES6 Javascript. It also uses the KoaJs instead of Express.

This new combination has allowed the code to be rewritten such that it is easier to read and understand, and therefore easier to maintain and support. More importantly, this makes it easier for you to develop your own APIs for your site!


The server is available under Envato’s standard licensing terms:

  • The Envato Regular Licence dated 23 February 2015
    • Purchase this licence if your application is free for your end users
  • The Envato Extended Licence dated 23 February 2015
    • Purchase this licence if your application charges your end users

Do review the full details of the licences from the pages linked above.

The tests for this module are a separate project, and available under GPL-3.0. These are distributed separately.


Support is provided under Envato’s standard support terms. Six months of support is included with the purchase, with an option to purchase additional support periods. Support requests can be raised through Envato after purchase.

Please let me know if you have any issues or requests in the Comments section for this item.

If you have a new test case in mind, or feel like one of the tests could be improved, please submit a pull request to, or create an issue ticket at, okaccounts-tests.


Brendan Graetz

Next steps

  1. Purchase OKAccounts
  2. Follow the provided installation instructions
  3. Add your own APIs to the server

Change List

  • v1.4.0 Performance improvement
    • Switch to MongoDB 2.0 from MongoDB 1.4
    • Switch MongoDB wrapper library
  • v1.3.0 Bug fix
    • In some edge cases, an existing account would be over-written when there is a new sign up
    • Fix this, plus added more tests to guard against this scenario
  • v1.2.0 Update Stripe API version:
  • v1.1.0 Bug fix
    • Catch and handle case when Stripe account is created, but credit card details are not stored
  • v1.0.0 Complete rewrite:
    • Replace ExpressJs with Koa
    • Use generator functions and yield as the main async mechanism, previously was a mix of callbacks and promise chains
    • Use ES2015 (ECMAScript 6) Javascript, previously was ES5 Javascript
    • Added instructions for deploying on HTTPS using Let’s Encrypt
    • Added sample routes for ACME router
    • Sample server can now serve both HTTP and HTTPS simultaneously
      • Note that in production, serving over HTTPS only is recommended
      • This feature is thus intended for use during development only
    • Refactored to have one route handler per file, to improve code readability
    • Rewrote test cases

Special thanks to @medoix for providing much suggestions and bug reports; which have led to several important improvements.