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

Publish token information with successful auth event #17

Closed pinnprophead closed 8 years ago

pinnprophead commented 8 years ago

This isn't really an issue, but it would be nice if the token information was published in the authSuccess event. A simple change:

        $rootScope.$broadcast('oauth2:authSuccess', service.token);

That way use of the token does not need to be tightly coupled to the library services.

Common use would be to extract the preferred name or email address from the identity token.

JamesRandall commented 8 years ago

Agreed - that would make sense, I'll get it added.

JamesRandall commented 8 years ago

I've added this to v1.0.3.