Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Error trying to load the supertokensui signup/in component in Vue (using Docs)#1105

Copy link
Copy link
@rezelute

Description

@rezelute
Issue body actions

馃悰 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/prebuiltui@v0.48.0/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."

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.