It would help if I typed in the right IP address! OK, I’ve corrected that, and now I get:
Failed to load resource: net::ERR_SSL_PROTOCOL_ERROR
Here’s the code I’m using:
var NakamaTest = pc.createScript('nakamaTest');
// initialize code called once per entity
NakamaTest.prototype.initialize = function() {
this.authenticate();
console.info("this.authenticate() completed");
};
// update code called every frame
NakamaTest.prototype.update = function(dt) {
};
NakamaTest.prototype.authenticate = async function() {
var client = new nakamajs.Client("WubbaLubbaDubDub", "10.1.200.12", 7350, true);
console.log(client);
const email = "hello@example.com";
const password = "somesupersecretpassword";
console.info("GOING TO AUTHENTICATE: " + email);
const session = await client.authenticateEmail({
email: email,
password: password
});
console.info("Authenticated successfully.");
};
The console prints out “GOING TO AUTHENTICATE”, but never prints “Authenticated successfully”.
The last argument to nakamajs.Client() is true, which means ‘use SSL’. If I specify this as false, I get this error instead:
Mixed Content: The page at 'https://launch.playcanvas.com/777742?debug=true' was loaded over HTTPS, but requested an insecure resource 'http://10.1.200.12:7350/v2/account/authenticate/email?'. This request has been blocked; the content must be served over HTTPS.
Thanks.