First published on CloudBlogs on Feb, 19 2015
I announced the
first preview of ADAL JS
for your help!
The core tenet of the library, getting the job done with the absolute minimal surface, was very well received. Here's my favorite quote, from
Angular JS Fundamentals fame
It was so easy that I'm still in shock trying to figure out if it really worked!
We didn't get everything right on first attempt, of course. Here there are few examples:
Although we engineered the library in distinct layers, we initially packaged everything in form of Angular JS module. You told us loud and clear that you wanted to be able to use ADAL JS outside of Angular, both directly at the JS/JQuery level or with other frameworks (like React JS). As a result, we split the library in two files – now you can pull in the core ADAL JS library without carrying any Angular dependencies.
Initially we saved tokens only in the local storage. That allows for a user to stay signed in even when a browser is closed and reopened, a nice feature for some scenarios but a hindrance in others. We extended ADAL JS to support saving tokens in the session storage, so that closing the browser will flush the session as in traditional web applications.
We also extended our collection of samples to better showcase how to use ADAL JS:
our original AngularJS
sample to the GA of the library. It demonstrates the minimal amount of code required to set Azure AD sign on to an AngularJS app.
Although those samples all have an ASP.NET backend, you are by no means limited to that. You can run your backend on any stack or platform, as long as it understand JWT tokens! Here there's a concrete example: Mat Velloso, from the Evangelism team, put together a great proof of concept that demonstrates how to use ADAL JS against a Web API backend implemented entirely in Node JS. Check it out
If you want to dig deeper in ADAL JS, please head to
this deep dive post
. You can find an introductory video