So the soft launch is today. I have one bug I found. This command should be pulling up the information of the current user(it runs if there is already an active session) but when I try from another account it pulls up my user information:
const accessToken = “[redacted]”;
const response = await fetch(‘https://portal.hawxservices.com/api/v1/users/me’, {
headers: {
Authorization: SSWS ${accessToken}
,
redirectUri: ‘Hawx Redirect’,
Accept: ‘application/json’,
ContentType: ‘application/json’
}
});
const user = await response.json();
const firstName = user.profile.firstName;
const lastName = user.profile.lastName;
const email = user.profile.email;
const phone = user.profile.mobilePhone || 'N/A';
console.log({ firstName, lastName, email, phone });
document.getElementById("messageBox").innerHTML = "Hello, " + firstName + " " + lastName + "! Please wait while your information is updated.";
Thanks! I gotta fix this fast!