IdentityModel / oidc-token-manager

Apache License 2.0
51 stars 36 forks source link

Architecture Questions: ADAL and IFrame #28

Closed tameyer1 closed 9 years ago

tameyer1 commented 9 years ago

Just wondering about a couple of differences between the oidc-token-manager and the way the adal js library is implemented and what you see as the trade offs. ADAL angular library implements as a provider so you can call it during config which centralizes your configuration and setup of an http interceptor. Do you see any issues with wrapping otm like the the adal angular js lib does for adal.js? ADAL sets up an iframe internally to act as the callback and token retrieval where otm requires the dev to setup explicitly a callback. What issues have you seen with the adal method? (browser or platform support issues?) On the surface the adal angular is less setup and code but what is the trade off? Keep up the outstanding work!

brockallen commented 9 years ago

ADAL only works with AAD, no? As Microsoft often says, ADAL is not a protocol library. oidc-token-manager (built on oidc-client) targets the protocol (not a product).

tameyer1 commented 9 years ago

I understand adal only works with AAD. I was looking into putting a wrapper around oidc-token-manager to try to minimize the code required to implement it into most angular apps we create. The wrapper would add http intercepter code, be implemented as a provider so initial setup is in config function, handle callback(maybe). adal and adal angular wrap the interaction with AAD this way. The adal implementation of the callback is handled by creating an iframe dynamically in the redirect uri page. does that raise any red flags based on your experience?

brockallen commented 9 years ago

Yea, I think you'd want a wrapper around it -- the protocol tends to be a tad low level for most devs.