Kony DBX
Published in

Kony DBX

Auth0 as Identity Provider with Kony

Auth0 is a great solution for Identity and Access Management and is extremely easy to use as Identity Provider with Kony.

Their pricing offers a free tier, which covers more than enough for prototype or proof-of-concept work.

7000 users?? #abundance thinking indeed

Setting it up takes less than half an hour if you know what you need to do, and I’ll walk through the steps somewhat high-level below.

Configuring Auth0

Sign up with the Free plan with Auth0.

They have a great onboarding tutorial and I suggest you go through it to understand Auth0 as a service.

For this example we’ll set up a machine-to-machine Auth0 Application.

Go through with the onboarding steps — I won’t cover that in detail here as Auth0 has great resources available for learning how to make use of it. All you need to know is that we need a machine-to-machine “app”.

Configuring Fabric (version 8.3 used for this project)

Log in to manage.kony.com with your Kony credentials. We’ll create a new App and configure it to manage the authentication with Auth0.

Obviously recycled values by now ;)

In Fabric the fields are almost a 1:1 match with their counterparts in Auth0. Pick the Grant type Authorization Code.

Make sure to copy/paste the Authorization end-point and the Token end-point from your Auth0 application. The Callback URL goes into Auth0 — it will make sure Fabric can then route us to call back into the app since the redirection is going to happen via the native browser in our app.

Building the test-app

So, fire up Visualizer (if you still don’t know what I’m talking about head over to the downloads page)

Choose to create a Custom Application -> Kony Reference Architecture

Witty test project names are recommended but not mandatory.

With your fresh project, create a new Javascript module.

Take a look at the following code:

kony.sdk.getCurrentInstance() will get us the Kony API to work with. getIdentityService will fetch the Identity Service we’ve set up in Fabric (by name) and thus in our case it was “Auth0” as that is the name of the Identity Service we set up.

options[“UseDeviceBrowser”] = true will make sure we make use of the native browser instead of an in-app webview (by some OAuth providers the webview might not be allowed as it’s seen as a security vulnerability)

options[“success_url”] = “konyfunctionalpreview://” will make sure the native browser will try to redirect to the Kony Preview Application after a successful login. The Kony SDK will then pick this up and we would be good to go with verifying the token and take the user to the next part of the journey.

We’ll need to hook our Visualizer project up to the Fabric Application for “Auth0” to be a valid reference:

Right-click brings the magic

So indeed right-click Kony Fabric in the project view and select “Use Existing App”. This will bring you a dialogue of the available apps connected to the instance of your Kony account.

Select the right Fabric App and you should see the available Identity Services in the Data tab.

Now to create the rudimentary UI for this test-app, which will be covered in the next part. You could experiment and go from here, if you do, don’t hesitate to reach out for any assistance.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Philip Nordenfelt

Philip Nordenfelt

Musings on contemplations and occasional Fintech insights