You can try below code for redirect to other link
// take variable and assign variable
let url = "https://app.hubspot.com/oauth/"
window.location.href = url
// direct assign a value
window.location.href = "https://app.hubspot.com/oauth/"
if it's not working for you please let me know.