JamesRandall / AngularJS-OAuth2

Package for allowing an AngularJS application to authenticate with an OAuth 2 / Open ID Connect identity provider using the implicit flow.
MIT License
46 stars 42 forks source link

Added autoSignin and support for navigating with states via (uiRouter) #32

Open daudihusbands opened 8 years ago

daudihusbands commented 8 years ago

Hi James, I found your directive very useful. Thank you for putting this together. I wanted to contribute a few minor additions.

Regards, Daudi

daudihusbands commented 8 years ago

Sorry about that last commit. I opened the file in Visual Studio and voila.. auto format.

JamesRandall commented 8 years ago

They look like useful additions - thanks for the pull request!

Do you know what you changed in that last commit? I should be able to figure it out but don't want to miss anything!

In any case I'll try and get this merged this weekend - thank you!

daudihusbands commented 8 years ago

The last commit is really about allowing the user to request user info after the 'oauth2:authSuccess' event has fired.

Added/modified lines: line 336: userInfoUrl: '@'... lines 413-420: if (scope.userInfoUrl && scope.userInfoUrl.length > 0) .....

daudihusbands commented 8 years ago

BTW. Have you looked at these repositories written by @dominickbaier and @brockallen?https://github.com/IdentityModel/oidc-token-manager, https://github.com/IdentityModel/IdentityModel.OidcClient

I'm thinking about refactoring this into AngularJs. Your work here has inspired me in the right direction.

JamesRandall commented 8 years ago

Thanks for the help - I'll get that included, and thanks again for the pull request - really appreciated.

I'm a big fan of those guys work - it's superb stuff and I use IdentityServer extensively. If you're looking at doing work in this space there stuff, along with the surprisingly readable, OpenID Connect spec are excellent references.

brockallen commented 8 years ago

I'm happy to help on this front -- I have my own TODO item to wrap the oidc-client library into something usable by NG or NG2. Also, on a side note, I've been rewriting the oidc-client and token-manager libraries in es6. You can see the progress here: https://github.com/IdentityModel/oidc-client-js/tree/dev

pinnprophead commented 8 years ago

I would be willing to help. I wrote a wrapper Angular service to wrap oidc -- nothing great but its a start.

brockallen commented 8 years ago

I have one as well here: https://github.com/IdentityManager/IdentityManager/blob/master/source/Core/Assets/Scripts/App/ttIdm.js#L80

brockallen commented 8 years ago

Also, just an update on the rewrite I'm doing... I'm about 95% done -- just a bit more then I will release the rewritten library. Any work on this front I'd encourage to be done on the rewritten oidc-client library.

daudihusbands commented 8 years ago

This is very encouraging. I also started my efforts to port to NG. Shall we converge our efforts under a single umbrella? Maybe @brockallen work can be that starting point. Seems like he won't need us after all :)

brockallen commented 8 years ago

Update on my end: https://github.com/IdentityModel/oidc-client-js/issues/2#issuecomment-214891289