TerryMooreII / angular-azure-mobile-service

An AngularJS service to interact with the Azure Mobile Service Client.
MIT License
68 stars 17 forks source link

add ability to set current user outside of login #20

Closed jmiazga closed 9 years ago

jmiazga commented 9 years ago

I have created custom authentication outside of what azure mobile services provides following this guide:

http://azure.microsoft.com/en-us/documentation/articles/mobile-services-dotnet-backend-get-started-custom-authentication/

It would be nice to be able to set the currentUser manually, with the token returned from my custom authentication.

TerryMooreII commented 9 years ago

I think that this would be a great addition. Correct me if I'm wrong but it sounds like you just need a method to set the current user object. Is that correct?

jmiazga commented 9 years ago

Thats correct. I can see the method setting the current user then adding it to session storage.

TerryMooreII commented 9 years ago

@jmiazga I added some code that I think will allow what you are looking for. However I recently switched jobs and currently dont have access to Azure to test it. Do you mind testing and letting me know if that works for you before I tag it and release the update to bower/cdn? Thanks.

jmiazga commented 9 years ago

Tested it out and it works for me. Thanks for the update. On a side note any chance of including the Azure Mobile Services client with this in bower?

TerryMooreII commented 9 years ago

Awesome. I will update bower and cdn.

Also I searched bower for the MS client and I couldn't find it. Is there another way to add the MS Client as a dependency?