-
Notifications
You must be signed in to change notification settings - Fork 606
Open
Labels
bugSomething isn't workingSomething isn't working
Description
🐛 Bug Report
I followed to docs here while setting up a very basic Vue 3 application: https://supertokens.com/docs/quickstart/frontend-setup, but i just get the following console error which is coming from: init genericComponentOverrideContext.js:1339
Uncaught TypeError: n is undefined
<template>
<div id="supertokensui" />
</template>
<script lang="ts">
import { defineComponent, onMounted, onUnmounted } from "vue";
export default defineComponent({
setup() {
const loadScript = (src: string) => {
const script = document.createElement("script");
script.type = "text/javascript";
script.src = src;
script.id = "supertokens-script";
script.onload = () => {
supertokensUIInit({
appInfo: {
appName: "Auth App",
apiDomain: "my-api-domain",
websiteDomain: "my-app-domain",
apiBasePath: "/auth",
websiteBasePath: "/auth",
},
recipeList: [supertokensUIEmailPassword.init(), supertokensUISession.init()],
});
};
document.body.appendChild(script);
};
onMounted(() => {
loadScript("https://cdn.jsdelivr.net/gh/supertokens/[email protected]/build/static/js/main.81589a39.js");
});
onUnmounted(() => {
const script = document.getElementById("supertokens-script");
if (script) {
script.remove();
}
});
},
});
</script>
I then tried to follow the docs for the Custom UI and there is a piece of code missing here:
"After that, call the following function when the user submits the form that you have previously created."
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working