Wakanda and Janrain:
Wakanda is web / desktop / mobile application development environment.Janran empowers businesses to connect with their customers in meaningful ways.
Purpose of this blog:
Demonstrate with a sample app how to integrate Wakanda and Janrain specifically to support authentication of users with multiple social networks and integrate with the Wakanda security system.Products
Wakanda is made of 3 specific tools:- Wakanda Studio
- A visual designer for your datastore and front end, as well as code editor.
- Wakanda Server
- A super-rapid datastore and HTTP server, it's a home for all your app's business logic.
- Wakanda Framework
- Widgets and the fast, standards-based datasources that feed them.
Basic Janrain workflow
- The user cames to the Wakanda website and clicks "Sign-in"
- A Janrain provided javascript displays a panel of social networks that the user selects one from.
- The user interacts with the social networks and authenticates
- User data is extracted by Engage
- Wakanda app retreives data from Engage
- Optional display data to registration form
- Optional retreive updated data
- Store data to Wakanda db
Wakanda - Janrain hybrid approach
I will be creating a Users table to add the authenticated users. It will contain where they came from (Google, PayPal, Yahoo, Twitter,etc) and update the Users table. For each user that is in that Users table, a unique entry will be made in the Directory.addUser() with a common password. Since login via Wakanda is not surfaced, there is no problem having a password (that I know of) common in the database. Wakanda is not doing the authentication, Janrain Engage is via the Social Networks. Wakanda will be controlloing the Authorization. The tables will be secured that only Users can perform the CRUD actions.
Setting up Janrain - 3 steps
Follow the steps described here. You'll basically:
- Signup - there's a reasonable free account of up to 2500 users
- Configure the widget - what Social Networks do you want to use. Note that not all networks provide the email - see https://rpxnow.com/docs/providers
- Get the code - a standard javascript boilerplate code will be provided. You'll see that in the Wakanda application in the index.html file.
- Call the API - once the user has completed interacting w/ Janrain, you have to make API calls in Javascript to retrieve email and other information about the authenticated user. You'll see this in the demo here too.
The Tutorial / Demo Instructions
There are only a few steps to do w/in Wakanda:
- Copy the javascript from janrain to the index.html source. Be sure to include directly before the </head>
- Update the TOKEN field to a URL to be posted back to
- You'll notice that mine has a full URL - that's because Janrain needs to post to it. My workstation is behind a firewall and on a wireless. I use DNS2GO to expose my workstation to the web.
- Copy the href code snippet from janrain to somewhere in the body.
- Create source folder called "scripts".
- Add a file called bootstrap.js
- Use the context menu to set the Role as Bootstrap
- Add a file called required.js - refer to demo source
- Create the allusers.html GRID
Run application and Enjoy
Great post. These instructions would work for the most part for implementing http://www.Lanoba.com social login too.
ReplyDeleteThanks again
Very good work, you have done !!
ReplyDeleteLaurent Ribardiere
Glad you enjoyed it.
ReplyDeletein the janrain you have to go to application settings and UNTICK the POST option.
ReplyDeleteYou cant get POST from javascript, it needs to be a get.
near drove me nuts. lol.
thanks.
Images Retouch is an Image Editing Company and provides Image Editing Services and Photo Editing Services India
ReplyDeleteImage processing Services
Outsourcing Photo Editing Services