for your help!
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:
- We updated 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.
- Finally, we have a new sample that shows you how to use ADAL to obtain tokens for a 3rd party web API, exposed via CORS, and automatically secure calls to it.
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 here.
Alex Simons (Twitter: Alex_A_Simons)
Director of PM
Microsoft Identity and Security Service Division