Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

581
Vistas
ERROR ReferenceError: OktaSignIn is not defined

I am trying to integrate okta with webpack and angular2, I am using almost everything correctly and I end up with error. I am using setup from https://angular.io/resources/zips/webpack/webpack.zip as it is and also followed things correctly mentioned at http://developer.okta.com/blog/2017/03/27/angular-okta-sign-in-widget

i tried to import okta-sign-in.min.js in vendor.ts as well in okta.service.ts with

import '@okta/okta-signin-widget/dist/js/okta-sign-in.min';

file gets imported but still i get OktaSignIn is not defined error

enter image description here

Thanks for any help in advance..

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

You definitely not following the steps. There's no significance of this line at all.

import '@okta/okta-signin-widget/dist/js/okta-sign-in.min';

okta-sign-in.min is a javascript which needs to be included either in index.html. If you are using angular-cli, then as mentioned in tutorial

"scripts": [
  "../node_modules/@okta/okta-signin-widget/dist/js/okta-sign-in.min.js"
],

All steps in tutorial are correctly mentioned.

Step 1: Create 1 service

declare let OktaSignIn: any;

This line will be needed, intialize the constructor here as per need.

Step 2: calling this service in whatevercomponent.component.ts.

over 4 years ago · Santiago Trujillo Denunciar

0

step1
import '@okta/okta-signin-widget/dist/js/okta-sign-in.min';
step2:
"scripts": [
  "../node_modules/@okta/okta-signin-widget/dist/js/okta-sign-in.min.js"
],
step3:
declare let OktaSignIn: any;
step4:
var Oktasignin=new Oktasignin('okta-signin-widget');

over 4 years ago · Santiago Trujillo Denunciar

0

replaced

declare let OktaSignIn: any;
import '@okta/okta-signin-widget/dist/js/okta-sign-in.min';

by

var OktaSignIn = require('@okta/okta-signin-widget');

just read somewhere it happens because of tslint not webpack

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda