8
Good afternoon, I’m having a problem implementing external login on a project I’m working on.
ASP.NET Web API + Owin + Oauth.
Ambience: Work with two Server1 and Server2 servers.
Server1: Server published on the WEB. It houses files (HTML, CSS, JS). In addition, it works as a proxy. All incoming calls (which are not called from files) are redirected to Server2.
Server2: Unpublished server. Receives calls only in Server1. This server houses a WEB API and is where the user must be authenticated.
Problem: When logging into Server2, Owin returns as redirect_uri the following parameter:
&redirect_uri=http://server2/signin-google
Since the parameter I need to return would be:
&redirect_uri=http://server1/signin-google
The only configuration I found was Callbackpath:
googleAuthOptions = new GoogleOAuth2AuthenticationOptions() {
ClientId = "xxxxxxx",
ClientSecret = "xxxxxxx",
CallbackPath = new PathString("/path"),
Provider = new GoogleAuthProvider()
};
But this setting does not work once new PathString("http://server1/signin-google")
is not a valid value.
Does anyone know how I solve this problem?