I keep trying to get the entity token but i can never get it to work and i dont know why.
THis is my current login form
```
function Login() |
// fetch input data |
var id = "D4589"; |
var username = document.getElementById('username').value; |
var password = document.getElementById('password').value; |
if(!id || id == "") |
OutputError("TitleId cannot be null"); |
return; |
else if(typeof PlayFab == 'undefined') // make sure we have the SDK prior to calling / setting |
OutputError("The PlayFab SDK could not be found. Double check your script sources"); |
return; |
// save these values locally to ease use |
localStorage.titleId = id; |
// save title id |
PlayFab.settings.titleId = id; |
// build http request object for LoginWithCustomId |
var LoginWithPlayFabRequest = {}; |
LoginWithPlayFabRequest.TitleId = id; |
LoginWithPlayFabRequest.Password = password; |
LoginWithPlayFabRequest.Username = username; |
OutputStatus("Logging in..."); |
PlayFabClientSDK.LoginWithPlayFab(LoginWithPlayFabRequest, (response, error) => { |
if(error) |
OutputError(error); |
else |
// display account details |
var result = response.data; |
var status = "Login Successful. <br \\> Welcome: " +username+"<br \\>"+result.EntityToken; |
OutputStatus(status); |
```
All the code does is display [object OBJECT]