Question

Here is my call: AuthSubUtil.getRequestUrl(next, scope, secure, session), where next = "https://mydomain.com/googleData"; scope = "http://www.google.com/calendar/feeds/"; secure = true; session = true;

My registered AuthSub target path prefix is http://mydomain.com. So, the problem is whenever i use https for next URL i am getting to "AuthSub target path prefix does not match the provided "next" URL" page. But it works well with http. My application uses both http and https, how can I work around this? As I cannot register my domain with both http and https. I have tried to change the target prefix to https://mydomain.com. It works for both now, but one thing I don't like now is whenever a user uses http after google's "Access Consent" page it is redirected to https... What I want is the users to stay at http if they were using http and vice versa. Can someone help me?

Was it helpful?

Solution

I solved the problem as follows: First, I set the target path URL to https: Second, before calling AuthSubUtil.getRequestUrl() i changed the next parameters value to start with https:// event though the request is coming from http Third, in order to redirect to the right protocol whether to http or https after Google Consent Page, i use the value i set in the cookie for protocol.

That's it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top