I have an MVC Application on X domain and a WCF Service in Y domain, and I want to use the same membership provider for both of them.
The WCF Service is in Y domain because the data is in an intranet server, and the MVC Application is in X domain because I don't want to handle all the request on our server that generates the data.
I want the user to login to the MVC Application and by doing so also authenticating to the WCF Service.
I don't know which would be the best way to do so, if I can create cookies for both things when they authenticate in the MVC Application (which I'm not sure how to accomplish). I don't want my WCF Service be available to anyone who's not authenticated.
So what I think I need is the AuthenticationService to validate the user and then pass the same username and password to my custom WCF Service to be able to interact with it.
The thing is that I validate my username with AuthenticationService and create a cookie (http://msdn.microsoft.com/en-us/library/bb515342.aspx) but then when I interact with my Custom WCF Service (Data) I need to supply username and password again (http://msdn.microsoft.com/en-us/library/ff647294.aspx), I have no problem with the username but the password I'm not sure how to manage it and I don't want to be asking for the password every time.
Is there something easier?