No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Ionic Platform Custom Auth Examples

These examples will get you up and running using Ionic Auth with your own server backend.

Examples are organized by web framework. Each example runs on port 5000 and defines a route, /auth, which is the entry point.

For these examples, we will be using the shared secret foxtrot and the endpoint http://localhost:5000/auth. These custom auth config options are specified in

custom auth setup

Use the included nodejs script to generate the URL to start the authentication process.

$ node genurl.js <YOUR_APP_ID>

Boot up your preferred example. For nodejs:

$ node express/server.js

Copy the generated URL from the genurl.js script into curl or a tool like postman.


The token (when successfully decoded) has the following payload, but you can alter genurl.js to change what gets sent to your server.

    "username": "dan",
    "password": "123"

Upon successful authentication, you should get a JSON response with the message You have successfully implemented custom authentication! in it.

Then you can look in your users list and see your authenticated, created user.

users list

Further documentation for custom authentication can be found here.