Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

580
Views
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 answers
Answer question

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 Report

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!