Jul 19, 2018

OKAccounts for NodeJS

Written by



User account management and payments in NodeJs are made easy.

Create an app or website with users and credit card payments?
When you do, you should not only code
the most important thing your app or website is doing,
but you must also enter code for user account and
and credit card payment processing logic as well.
To say that can be boring is an understatement,
and it will take a lot of steam out
what you really do want to focus on.

… no more!

The good news is that OKAccounts provides a starter NodeJ server
with all the APIs that are already built in.
Which one free yourself to focus your coding efforts on
The core features of your app or website!


  • sign up
    • With email confirmation
  • sign in
    • Token-based approval
    • Role-based authorization
    • Reusable and expandable middleware
  • Credit card payments
  • Based on APIs
    • JSON response
    • Ideal for native apps & single page applications
  • Easy to integrate
    • Detailed instructions provided
    • Descriptive comments to help you understand what's going on
  • Robust, reliable
    • Good test with comprehensive integration test 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 an older version on NodeJs (v0.10.x),
was written in ES5 Javascript,
and used the Express library.

OKAccounts are 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 KoaJs instead of Express.

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


The server is available under Envato's standard license terms:

  • The Envato Regular License
    dated February 23, 2015

    • Purchase this license if your application is free to your end users
  • The Envato Extended License
    dated February 23, 2015

    • Purchase this license if your application charges your end users

Review the full details of the licenses from the above pages.

The tests for this module are one separate project and available below
GPL 3.0.
These are distributed separately.


Support is granted below
Envato's default support terms.
Six month support is included in purchase,
with the option to purchase additional support periods.
Support requests can be raised through Envato after purchase.

Notify me if you have any questions or requests
in comments section for this item.

If you have a new test case in mind,
or feel that one of the tests could be improved,
Please submit a pull request to,
or create a problem on,
okaccounts tests.


Brendan Graetz

Next step

  1. Buy OKAccounts
  2. Follow the enclosed installation instructions
  3. Add your own APIs to the server

OKAccounts preview

Flag Counter

Change list

  • v1.4.0 Performance improvement

    • Switch to MongoDB 2.0 from MongoDB 1.4
    • Change MongoDB wrapper library
  • v1.3.0 Error Correction

    • In some cases, an existing account will be overwritten
      when there is a new registration
    • Solve this plus add more tests to protect this scenario
  • v1.2.0 Update Stripe API Version:

  • v1.1.0 Error Correction

    • Catch and trade cases when Stripe account is created,
      but credit card information is not saved
  • v1.0.0 Complete rewriting:

    • Replace ExpressJs with Koa
    • Use generator features and yield as the primary async mechanism,
      Earlier there was a mix of recalls and lifts
    • Use ES2015 (ECMAScript 6) Javascript,
      Previously, ES5 was Javascript
    • Added instructions for implementation on HTTPS using Let's encrypt
    • Added test routes to ACME router
    • The trial server can now both serve HTTP and HTTPS
      • Note that it is only recommended to operate over HTTPS in production
      • This function is thus intended for use in development only
    • Refactored to have a route manager per. File,
      to improve code readability
    • Rewrote test cases

Special thanks to
to provide many suggestions and bug reports;
which has led to several important improvements.


Article Tags:
Article Categories:
ThemeForest best selling themes

Jaeho Park completed a Master in Fine Arts at the Hongik University in 1999, followed by a Master in Photographic Studies at the University of Westminster in 2012. After working for many years as a university professor, designer and curator in South Korea.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.