To call the script, we recommend putting it in an external file, and wrapping it in a function instead of the event that the script is wrapped in, and after the end of the function you should "export default {name of function}"
Then in any component, you can import this function and call it in the onMounted() hook. You can have the html part in your component template, so you can style them.
Once the user gets redirected to your redirect url, you should again validate the data provided as query params: ' type', 'project', 'request_id' and 'token'. After you have validated that the request for the provided data is validated, you should login/register the requests email (user).