This is my first question on here so bear with me.
I have an app, in {N} and Angular, with a post request to login to my server. With a http.post using a http url works but when i change to a http.post using a https url, it no longer logs me in.
The strange bit is, it works in a browser but not in my app. As for the server cert, it's a proper bought one so its not running into a cert warning.
Any help would be appreciated.
This is the code in the function called by the login button:
this.userService.login(this.user)
.subscribe(
() => this.router.navigate(["/all"]),
(error) => {
alert("Unfortunately we could not find your account.");
console.dump(error)
}
);
And this is the code of the http call:
login(user: User) {
let headers = new Headers();
headers.append("Content-Type", "application/x-www-form-urlencoded");
headers.append("Accept", "application/json");
let options = new RequestOptions({ headers: headers, withCredentials: true });
let data = "j_username=" + user.username + "&" + "j_password=" + user.password;
return this.http.post(Config.apiUrlS + "static/auth/j_spring_security_check", data, options);
}
---EDIT---
So it turns out that the android emulator and device ive tested the app on dont like the RapidSSL SHA256 CA cert we have on the server. Is this the reason why it doesnt work?