okta / okta-signin-widget

HTML/CSS/JS widget that provides out-of-the-box authentication UX for your organization's apps
Other
373 stars 320 forks source link

Sign-in widget not compatible with Nuxt.js #1946

Open chrisnetonline opened 3 years ago

chrisnetonline commented 3 years ago

:information_source: If you have a question, please post it on the Okta Developer Forum instead. Issues in this repository are reserved for bug reports and feature requests.

I'm submitting a

Background info

We are wanting to utilize the Okta sign-in widget in our Nuxt.js single page app.

<template>
  <section>Testing</section>
</template>

<script>
import OktaSignIn from "@okta/okta-signin-widget";

export default {
  mounted() {
    console.log(OktaSignIn);
  },
};
</script>

Expected behavior

No Javascript errors should be received.

What went wrong?

image

Steps to reproduce

I am using a base install of Nuxt.js and simply importing the @okta/okta-signin-widget package: https://codesandbox.io/s/dreamy-sun-xlhoj

Your environment

bryanapellanes-okta commented 3 years ago

@chrisnetonline, Thanks for reaching out! I'll bring this to the attention of our Javascript developers and someone will comment here with more.

Thanks for using Okta!

bryanapellanes-okta commented 3 years ago

Internal Ref: OKTA-395193

shuowu commented 3 years ago

@chrisnetonline okta-signin-widget is a client-side widget, currently, it cannot support server-side framework very well. A workaround for your use case is to use widget via okta CDN. See the details here.