daily pastebin goal
19%
SHARE
TWEET

crash log

a guest Nov 6th, 2018 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5.   <meta charset="utf-8">
  6.   <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7.   <title>Sign In to myPLTW</title>
  8.   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  9.   <style>
  10.       body { background: #f4f3f0; font-family: "proxima-nova", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.6; color: #4d4d4d; margin: 0px; padding: 0px; } .auth0-lock-overlay, .auth0-lock-name { display: none; } .auth0-lock.auth0-lock .auth0-lock-header-bg { height: auto; } .auth0-lock.auth0-lock.auth0-lock-opened .auth0-lock-widget { box-shadow: 0 4px 5px -1px rgba(0,0,0,0.15); }  .auth0-lock.auth0-lock .auth0-lock-header-logo { width: 194px; height: 84px; margin: 10px 0 0 27px; }
  11.       .authCenter {
  12.         margin: 2% auto 7em;
  13.         display: block;
  14.         width: 450px;
  15.       }
  16.       .innerDiv {
  17.         padding: 1em 2em 1em;
  18.         background: #fff;
  19.         border-radius: 3px;
  20.         box-shadow: 0 4px 5px -1px rgba(0, 0, 0, 0.15);
  21.       }
  22.       .loginSwitch {
  23.         text-align: right;
  24.         padding-bottom: 10px;
  25.         padding-top: 10px;
  26.         font-size: 16px;
  27.       }
  28.       .align-right { float:right; }
  29.       .authFooterText {
  30.         margin: 0 auto;
  31.         height: auto;
  32.         padding: 0 1em;
  33.         width: 450px;
  34.         font-weight: 300;
  35.       }
  36.       a, a:visited {
  37.         text-decoration: none;
  38.         color: #2d8692;
  39.         font-weight: 500;
  40.         cursor: pointer;
  41.       }
  42.       a:hover, a:focus {
  43.         color: #1b5058;
  44.         text-decoration: none;
  45.       }
  46.  
  47.       .footerLeft {
  48.         width: 50%;
  49.         font-size: 10px;
  50.         float: left;
  51.         overflow: hidden
  52.       }
  53.       .footerRight {
  54.         width: 50%;
  55.         font-size: 10px;
  56.         float: right;
  57.         text-align: right;
  58.         color: #2d8692;
  59.       }
  60.       .inputText {
  61.         position: relative;
  62.         margin-bottom: 15px;
  63.         font-weight: 500;
  64.       }
  65.  
  66.       .inputRow {
  67.         flex-basis: 100%;
  68.         max-width: 100%;
  69.         align-items: center;
  70.         margin-right: -0.5rem;
  71.         margin-left: -0.5rem;
  72.         box-sizing: border-box;
  73.       }
  74.  
  75.       .inputElement {
  76.         display: block;
  77.         width: 100%;
  78.         padding: 6px 6px;
  79.         font-size: 14px;
  80.         color: #555;
  81.         background-color: #fff;
  82.         background-image: none;
  83.         border: 1px solid #ddd;
  84.         line-height: 1.6;
  85.         box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
  86.         transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
  87.         border-radius: 3px;
  88.         outline: none;
  89.         margin-top: 5px;
  90.       }
  91.  
  92.       .buttonRow {
  93.         padding-bottom:10px;
  94.         height:2rem;
  95.         font-size:14px;
  96.         font-weight:300;
  97.         margin-right: -0.5rem;
  98.         margin-left: -0.7rem;
  99.       }
  100.  
  101.       .logLinks {
  102.         float:left;
  103.         padding: 1em 0 1em 0.5em;
  104.         flex-basis: 50%;
  105.         max-width: 55%;
  106.       }
  107.  
  108.       .logButton {
  109.         float:right;
  110.         text-align: right;
  111.         flex-basis: 50%;
  112.         max-width: 50%;
  113.         font-family: "proxima-nova", Helvetica, Arial, sans-serif;
  114.         margin-top:5px;
  115.       }
  116.  
  117.       .buttonPrimary {
  118.         color: white;
  119.         background: #2d8692;
  120.         border: 1px solid #2d8692;
  121.         border-radius: 3px;
  122.         font-weight: 300;
  123.         font-size:14px;
  124.         min-width: 120px;
  125.         box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.12);
  126.         margin-left: 5px;
  127.         height: 40px;
  128.         cursor: pointer;
  129.         line-height: 1.35;
  130.         letter-spacing: 0.5px;
  131.       }
  132.       .buttonPrimary:disabled {
  133.         background-color: #FFF;
  134.           color: #ddd;
  135.           pointer-events: none;
  136.           cursor: auto;
  137.         box-shadow: none;
  138.           border: 1px solid #ddd;
  139.       }
  140.  
  141.       .buttonSecondary {
  142.         color: #2d8692;
  143.         background: #FFF;
  144.         border: 1px solid #2d8692;
  145.         border-radius: 3px;
  146.         font-weight: 300;
  147.         font-size:14px;
  148.         min-width: 165px;
  149.         box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.12);
  150.         margin-left: 5px;
  151.         height: 40px;
  152.         cursor: pointer;
  153.         line-height: 1.35;
  154.         letter-spacing: 0.5px;
  155.       }
  156.       .buttonSecondary:hover {
  157.         color: white;
  158.         background: #2d8692;
  159.       }
  160.  
  161.       .buttonSecondary:disabled {
  162.         background-color: #FFF;
  163.           color: #ddd;
  164.           pointer-events: none;
  165.           cursor: auto;
  166.         box-shadow: none;
  167.           border: 1px solid #ddd;
  168.       }
  169.  
  170.       .error {
  171.         font-size: 14px;
  172.         line-height: 2rem;
  173.         color: #de3226;
  174.       }
  175.  
  176.       .hide {
  177.         display:none;
  178.       }
  179.  
  180.       .inputText .invalid{
  181.         border: 1px solid red;
  182.       }
  183.  
  184.       .inputText .valid{
  185.         border: 1px solid green;
  186.       }
  187.  
  188.       .error_show {
  189.         color: red;
  190.         margin-left: 10px;
  191.       }
  192.  
  193.       .success_message {
  194.         color: #41d26f;
  195.         margin-left: 10px;
  196.       }
  197.  
  198.       .errorRow {
  199.         margin-top: 20;
  200.         margin-bottom:20;
  201.         padding:20;
  202.         font-size:14px;
  203.         font-weight:600;
  204.         color:red;
  205.       }
  206.       .footer {
  207.         bottom:0;
  208.         width:100%;
  209.         height:75px;
  210.         padding-top : 10px;
  211.         position: absolute;
  212.       }
  213.         .left-content { width: 72%; float: left; overflow: hidden; font-size: 11px; }
  214.       .right-content { font-size: 12px; }
  215.       .null-header {
  216.         background: #FFFFFF !important;
  217.         height:60px;
  218.         padding: 10px 0px 10px 0px;
  219.       }
  220.  
  221.       .adult-header {
  222.         background: #FFFFFF !important;
  223.         height:60px;
  224.         padding: 10px 0px 10px 0px;
  225.       }
  226.       .student-header {
  227.         background: #2d8692 !important;
  228.         height:60px;
  229.         padding: 10px 0px 10px 0px;
  230.         font-size: 20px;
  231.         color : #FFFFFF;
  232.       }
  233.       .student-logo {
  234.         box-sizing: border-box;
  235.         display: inline-block;
  236.         border-right: solid 2px #FFFFFF;
  237.         float : left;
  238.         width: 240px;
  239.         overflow: hidden;
  240.         margin-right: 20px;
  241.       }
  242.       .adult-logo {
  243.         box-sizing: border-box;
  244.         display: inline-block;
  245.         float : left;
  246.         width: 240px;
  247.         overflow: hidden;
  248.       }
  249.  
  250.       .login-logo{
  251.         display: block;
  252.         width: 100%;
  253.         font-size: 20px;
  254.         color: #555;
  255.         line-height: 1.6;
  256.         border-bottom: solid 1px #ddd;
  257.         padding: 6px 10px 10px 0px;
  258.         margin-bottom: 15px;
  259.       }
  260.       .bold { font-weight:600; }
  261.  
  262.       .reset-password-message, .login-error-message{
  263.         padding: 15px;
  264.         margin-bottom: 5px;
  265.         border: 1px solid transparent;
  266.         background: #fff;
  267.         border-radius: 3px;
  268.         box-shadow: 0 4px 5px -1px rgba(0,0,0,0.15);
  269.         background-color: #fff6ef !important;
  270.         border-color: #faebcc !important;
  271.         color: #8a6d3b !important;
  272.       }
  273.  
  274.     .loginAlert{
  275.      background-color: #2d8692;
  276.      color: #fff;
  277.      padding-left:7px;
  278.      word-break: break-word;
  279.     }
  280.     </style>
  281.  
  282.   <!--[if IE 8]>
  283.   <script src="//cdnjs.cloudflare.com/ajax/libs/ie8/0.2.5/ie8.js"></script>
  284.   <![endif]-->
  285.  
  286.   <!--[if lte IE 9]>
  287.   <script src="https://cdn.auth0.com/js/base64.js"></script>
  288.   <script src="https://cdn.auth0.com/js/es5-shim.min.js"></script>
  289.   <![endif]-->
  290.   <!--<script src="https://cdn.auth0.com/js/lock/10.11/lock.min.js"></script>-->
  291.  
  292. </head>
  293. <body>
  294.   <div class="null-header">&nbsp;</div>
  295.     <div class="adult-header" style="display:none;">
  296.         <div class="adult-logo">
  297.             <svg version="1.2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="100px" y="0px" width="250px" height="50" viewBox="-100 -10 230 75" xml:space="preserve" preserveAspectRatio="xMinYMid" aria-labelledby="title">
  298.               <title>myPLTW</title>
  299.               <path fill="#14467A" d="M107.4,46.7V18.1v-0.3h16.5c3.7,0,6.6,0.8,8.6,2.4l0,0c2,1.5,3,3.7,3,6.4l0,0c0,2.7-1,4.8-3,6.4l0,0 c-2,1.5-4.8,2.3-8.5,2.3l0,0c-0.1,0-0.1,0-0.2,0l0,0h-11V47h-5.4L107.4,46.7L107.4,46.7z M122.2,31.4c0.1,0,0.1,0,0.2,0l0,0 c2.7,0,4.6-0.4,5.8-1.3l0,0c1.2-0.9,1.8-2,1.8-3.6l0,0c0-1.5-0.5-2.8-1.8-3.6l0,0c-1.3-0.9-3.2-1.3-6-1.3l0,0H113v9.8L122.2,31.4 C122.3,31.3,122.3,31.4,122.2,31.4z M137.9,46.7V18.1v-0.3h5.5V43h19.6v3.8L137.9,46.7L137.9,46.7z M187,17.8l7.1,23.1l8.1-23.1h5.7 l8,23.1l7.3-23.1h5.5l-10.1,28.8l-0.1,0.2h-5.5l0,0l-8.2-23.4l-8.3,23.4H191l-8.4-25.1h-11.3v25.1h-5.5l0,0V21.6h-12.3v-3.8H187 L187,17.8z"></path><path fill="#C41230" d="M64.3,27.7c0.2-0.4,0.3-1.1,0.5-1.4c1.4-3.1,4-7.7,7.4-7.7c1.9,0,2.9,1.8,2.9,4.7c0,0.7-0.2,1.9-0.3,2.7 c-0.1,0.3-0.2,0.6-0.2,1l0.2,0.1c0.2-0.3,0.3-0.8,0.3-1.1c1.4-3,4-7.4,7.2-7.4c2,0,3.1,1.9,3.1,5.2c0,3.7-1.8,10.8-2.7,14.7 c-0.1,0.5,0.2,0.7,0.3,0.7c0.3,0,0.9-0.1,1.4-0.3c0.2-0.1,0.3,0.3,0.3,0.3c0,0.1,0,0.1-0.1,0.2c-1.6,0.9-4.2,1.3-5.2,1.3 c-0.5,0-0.9-0.3-0.9-0.6s0.1-0.5,0.1-0.7c0.5-2.5,2.2-11.1,2.2-14.2c0-1.5-0.3-2.8-1.3-2.8c-2,0-4.2,4.2-5.5,8.9 c-0.9,3-1.6,6.8-1.7,7.5c-0.2,1-0.4,1.6-1.5,1.6l-2.4,0.1c-0.2,0-0.3-0.2-0.3-0.3c0.7-3.6,2.2-11,2.2-14.7c0-1.8-0.3-3-1.3-3 c-1.8,0-4.1,4.2-5.5,8.8c-0.6,2.3-1.5,6-1.8,7.6c-0.2,0.9-0.5,1.5-1.5,1.5l-2.4,0.1c-0.2,0-0.3-0.1-0.2-0.3c0.3-1.6,1-6.4,1.6-10.8 c0.5-4.1,1.1-7.3,1.2-8.5c0.1-0.7-0.2-0.8-0.3-0.8c-0.3,0-0.8,0.1-1.4,0.3c-0.2,0.1-0.4-0.3-0.4-0.3s0.1-0.2,0.2-0.2 c1.2-0.5,4.3-1.3,6.1-1.3c0.8,0,1.4,0.3,1,1.5c-0.3,1.5-0.9,4.5-1.4,6.2c-0.1,0.3-0.2,0.8-0.3,1.2L64.3,27.7z"></path><path fill="#C41230" d="M95.5,36.2c0.3-0.6,0.5-1.2,0.7-1.6c1.6-4.4,3.2-8.8,3.8-12.5c0.1-0.4,0.3-1.5,0.3-2c0-0.2,0.1-0.3,0.3-0.3 c0.8-0.5,2.6-1.1,3.6-1.1c0.3,0,0.3,0.2,0.3,0.3c0,0.5-0.3,1.2-0.7,2.4c-1.5,3.7-6.2,13.5-9,18.5c-1.5,2.5-5.5,9.6-9.4,9.6 c-0.5,0-1-0.2-1.3-0.5c-0.3-0.4-0.6-1.7-0.6-2.7c0-0.3,0.3-0.7,0.5-0.7c0.1,0,0.1,0,0.1,0.1c0.5,0.7,1.3,1,2.1,1 c1.8,0,4.2-1.9,5.6-4.5c0.2-0.3,0.3-0.5,0.2-1c-0.8-4.6-1.8-13.3-2.4-20.1c0-0.4-0.3-0.8-0.5-0.8s-0.5,0.1-1.1,0.2 c-0.2,0.1-0.4-0.3-0.4-0.3c0-0.1,0.1-0.2,0.2-0.2c1.2-0.5,4.2-1.2,6.2-1.2c0.5,0,0.9,0.3,0.9,1.3c0.1,3.6,0.3,10.8,0.5,14.9 c0,0.4,0.1,0.9,0.1,1.5h0.3L95.5,36.2L95.5,36.2z"></path><path fill="#C41230" d="M27.9,63.6c-6.3,0-10.1-15.2-10.1-29.9S21.5,3.9,27.9,3.9s10.1,15.2,10.1,29.9S34.2,63.6,27.9,63.6z M27.9,5.4c-4.1,0-8.6,11.4-8.6,28.4s4.4,28.4,8.6,28.4s8.6-11.4,8.6-28.4C36.4,16.8,32,5.4,27.9,5.4z"></path><path fill="#C41230" d="M8.1,51.7c-2.8,0-4.8-0.8-5.7-2.3c-3.3-5.4,7.7-16.5,20.2-24.2c6.7-4.1,13.5-7.1,19.2-8.5 c6-1.5,10.1-0.9,11.5,1.5c1.5,2.4,0.1,6.3-3.9,11c-3.8,4.4-9.6,9.1-16.3,13.2c-6.7,4.1-13.5,7.1-19.2,8.5 C11.7,51.4,9.8,51.7,8.1,51.7z M47.7,17.3c-1.5,0-3.4,0.3-5.5,0.8c-5.5,1.4-12.2,4.3-18.8,8.4C8.9,35.3,1.5,45,3.7,48.6 c1.1,1.8,4.7,2.1,9.9,0.8c5.5-1.4,12.2-4.3,18.8-8.3s12.2-8.6,16-12.9c3.5-4,4.9-7.4,3.8-9.2C51.4,17.8,49.9,17.3,47.7,17.3z"></path><path fill="#C41230" d="M47.6,52.2c-6.3,0-16.4-4.3-25.2-10c-12.3-8-23-19.5-19.5-24.8c1.5-2.4,5.7-2.8,11.6-1.2 c5.6,1.6,12.4,4.8,19,9.1c12.3,8,23,19.5,19.5,24.8l0,0C51.9,51.6,50.1,52.2,47.6,52.2z M8.2,16.8c-2,0-3.4,0.5-4.1,1.5 C1.9,21.7,9,31.6,23.2,40.9s26.2,11.8,28.4,8.3c2.3-3.5-4.9-13.4-19.1-22.7c-6.5-4.2-13-7.4-18.5-8.9C11.8,17.1,9.8,16.8,8.2,16.8z M52.3,49.7L52.3,49.7L52.3,49.7z"></path><path fill="#808080" d="M32.3,37.6c-0.4-0.4-0.5-1-0.2-1.5c0.3-0.5,0.8-0.6,1.4-0.5l1.3,0.4c0.3-0.8,0.4-1.8,0.4-2.7h-1.4 c-0.6,0-1.1-0.3-1.2-0.9c-0.2-0.6,0.2-1.1,0.6-1.3l1.2-0.7c-0.4-0.8-1-1.6-1.6-2.2l-1,1c-0.4,0.4-1,0.5-1.5,0.2s-0.6-0.8-0.5-1.4 l0.4-1.3c-0.8-0.3-1.8-0.4-2.7-0.4v1.4c0,0.6-0.3,1.1-0.9,1.2c-0.6,0.1-1.1-0.1-1.3-0.6l-0.7-1.2c-0.8,0.4-1.6,1-2.2,1.6l1,1 c0.4,0.4,0.5,1,0.2,1.5c-0.3,0.5-0.8,0.6-1.4,0.5L21,31.2c-0.3,0.8-0.4,1.8-0.4,2.7H22c0.6,0,1.1,0.3,1.2,0.9 c0.1,0.6-0.1,1.1-0.6,1.3l-1.2,0.7c0.4,0.8,1,1.6,1.6,2.2l1-1c0.4-0.4,1-0.5,1.5-0.2s0.6,0.8,0.5,1.4l-0.4,1.3 c0.8,0.3,1.8,0.4,2.7,0.4v-1.4c0-0.6,0.3-1.1,0.9-1.2c0.6-0.2,1.1,0.2,1.3,0.6l0.7,1.2c0.8-0.4,1.6-1,2.2-1.6L32.3,37.6z M28.6,36.5 C27,37,25.4,36,25,34.4c-0.4-1.6,0.6-3.2,2.1-3.6c1.6-0.4,3.2,0.6,3.6,2.1C31.1,34.5,30.2,36.1,28.6,36.5z"></path><path fill="#14467A" d="M22.2,13.2c-1.4,0-2.5-1.1-2.5-2.5s1.1-2.5,2.5-2.5s2.5,1.1,2.5,2.5S23.6,13.2,22.2,13.2z"></path><path fill="#14467A" d="M11.5,53c-1.4,0-2.5-1.1-2.5-2.5s1.1-2.5,2.5-2.5s2.5,1.1,2.5,2.5S12.9,53,11.5,53z"></path><path fill="#14467A" d="M49.9,43.6c-1.4,0-2.5-1.1-2.5-2.5s1.1-2.5,2.5-2.5s2.5,1.1,2.5,2.5S51.3,43.6,49.9,43.6z"></path><path fill="#FFFFFF" d="M22.2,8.8c1.1,0,1.9,0.9,1.9,1.9c0,1.1-0.9,1.9-1.9,1.9s-1.9-0.9-1.9-1.9S21.2,8.8,22.2,8.8 M22.2,7.7 c-1.7,0-3,1.4-3,3s1.4,3,3,3s3-1.4,3-3S23.9,7.7,22.2,7.7L22.2,7.7z"></path><path fill="#FFFFFF" d="M11.5,48.6c1.1,0,1.9,0.9,1.9,1.9s-0.9,1.9-1.9,1.9c-1.1,0-1.9-0.9-1.9-1.9S10.5,48.6,11.5,48.6 M11.5,47.5 c-1.7,0-3,1.4-3,3s1.4,3,3,3s3-1.4,3-3S13.2,47.5,11.5,47.5L11.5,47.5z"></path><path fill="#FFFFFF" d="M49.9,39.2c1.1,0,1.9,0.9,1.9,1.9c0,1.1-0.9,1.9-1.9,1.9c-1.1,0-1.9-0.9-1.9-1.9C48,40,48.9,39.2,49.9,39.2 M49.9,38.1c-1.7,0-3,1.4-3,3s1.4,3,3,3s3-1.4,3-3S51.6,38.1,49.9,38.1L49.9,38.1z">
  300.               </path>
  301.           </svg>
  302.         </div>
  303.     </div>
  304.     <div class="student-header" style="display:none;">
  305.         <div class="student-logo">
  306.         <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="100px" y="0px" width="250px" height="50" viewBox="0 1 280 120" style="enable-background:new 0 0 369 144;" xml:space="preserve">
  307.         <style type="text/css">
  308.             .st0{fill:#FFFFFF;}
  309.         </style>
  310.         <g>
  311.             <path class="st0" d="M86.4,46.3c-0.8-1.3-2.1-2.3-3.7-2.8c-1.5-0.6-3.4-0.8-5.4-0.8c-9.6,0-24.7,5.6-40.2,15.2
  312.                 c-9.7,6-17.8,12.7-23.7,18.9C7.7,83,4.2,88.7,4.1,93.3c0,1.3,0.3,2.6,1,3.7c0.8,1.3,2.1,2.3,3.6,2.8c1.5,0.6,3.3,0.8,5.2,0.8
  313.                 c-0.2-0.6-0.3-1.1-0.3-1.8c0-0.2,0-0.5,0-0.7c-1.7,0-3.1-0.3-4.1-0.7c-1.2-0.4-1.9-1.1-2.4-1.8c-0.4-0.6-0.6-1.4-0.6-2.4
  314.                 c-0.1-3.4,3.1-9,8.7-14.9c5.6-6,13.7-12.5,23.2-18.5C53.6,50.4,68.6,45,77.3,45.1c1.8,0,3.4,0.2,4.6,0.7c1.2,0.4,2,1.1,2.4,1.8
  315.                 c0.4,0.7,0.6,1.4,0.6,2.4c0.1,3.4-3.1,9-8.7,14.9c-5.6,6-13.7,12.5-23.2,18.5C43,89.7,33,94.2,24.8,96.5c0.3,0.7,0.5,1.5,0.5,2.4
  316.                 c8.5-2.4,18.6-7,29-13.4c9.7-6,17.8-12.7,23.7-18.9c5.8-6.2,9.3-11.9,9.4-16.6C87.4,48.6,87,47.4,86.4,46.3z"/>
  317.             <path class="st0" d="M16.5,98.9c0,1.7,1.4,3,3,3l0,0c1.7,0,3-1.4,3-3l0,0c0-1.7-1.4-3-3-3l0,0C17.9,95.9,16.5,97.2,16.5,98.9
  318.                 L16.5,98.9z"/>
  319.             <path class="st0" d="M84.9,87.6c-0.6,0.6-1.3,1-2.1,1.3c1,2.1,1.5,3.9,1.5,5.3c0,1-0.2,1.9-0.7,2.5c-0.9,1.4-3.1,2.3-6.5,2.3
  320.                 c-8.6,0-23.8-5.8-39-16c-9.3-6.1-17-12.8-22.5-19C10.2,58.1,7.2,52.5,7.2,49c0-1,0.2-1.9,0.7-2.5c0.9-1.4,3.1-2.3,6.5-2.3
  321.                 c8.6,0,23.8,5.8,39,16c9.3,6.1,17,12.8,22.5,19c0.2,0.2,0.3,0.4,0.5,0.6c0.5-0.6,1.2-1.1,1.9-1.5c-0.2-0.2-0.4-0.5-0.6-0.7
  322.                 c-5.6-6.3-13.5-13.1-22.9-19.4C39.2,47.8,23.9,41.8,14.4,41.7c-3.7,0-6.8,1-8.5,3.4c-0.8,1.1-1.1,2.5-1.1,3.9
  323.                 c0.1,4.7,3.4,10.4,9,16.8c5.6,6.3,13.5,13.1,22.9,19.4c15.6,10.3,30.8,16.4,40.4,16.4c3.7,0,6.8-1,8.5-3.4c0.8-1.1,1.1-2.5,1.1-3.9
  324.                 C86.7,92.3,86,90,84.9,87.6z"/>
  325.             <path class="st0" d="M57.5,38.3c-1.4-4.3-3-7.8-5-10.4c-1.9-2.5-4.2-4.1-6.8-4.1c-2.6,0-4.9,1.6-6.8,4.1c-0.3,0.4-0.6,0.8-0.9,1.3
  326.                 c0.8,0.2,1.6,0.5,2.2,1c0.2-0.3,0.4-0.6,0.6-0.8c1.7-2.2,3.4-3.2,4.9-3.2c1.5,0,3.2,1,4.9,3.2c2.5,3.3,4.8,9.1,6.4,16.4
  327.                 c1.6,7.3,2.5,16.2,2.5,25.8c0,12.8-1.7,24.3-4.3,32.6c-1.3,4.1-2.9,7.4-4.6,9.6c-1.7,2.2-3.4,3.2-4.9,3.2c-1.5,0-3.2-1-4.9-3.2
  328.                 c-2.5-3.3-4.8-9.1-6.4-16.4c-1.6-7.3-2.5-16.2-2.5-25.8c0-12,1.5-22.9,3.9-31.1c-0.8-0.1-1.6-0.4-2.3-0.9c-0.5,1.8-1,3.6-1.4,5.6
  329.                 c-1.6,7.5-2.6,16.6-2.6,26.3c0,13,1.7,24.8,4.5,33.4c1.4,4.3,3,7.8,5,10.4c1.9,2.5,4.2,4.1,6.8,4.1c2.6,0,4.9-1.6,6.8-4.1
  330.                 c2.9-3.8,5.2-9.8,6.8-17.4C61,90.5,62,81.4,62,71.7C62,58.7,60.3,46.9,57.5,38.3z"/>
  331.             <path class="st0" d="M33.7,34.8c0,1.7,1.4,3,3,3l0,0c1.7,0,3-1.4,3-3l0,0c0-1.7-1.4-3-3-3l0,0C35.1,31.8,33.7,33.2,33.7,34.8
  332.                 L33.7,34.8z"/>
  333.             <path class="st0" d="M52.6,77.9c-0.7-0.6-0.9-1.6-0.4-2.3c0.5-0.8,1.4-1,2.2-0.8l2.1,0.6c0.5-1.4,0.7-2.8,0.6-4.3l-2.2,0
  334.                 c-0.9,0-1.7-0.5-1.9-1.4c-0.2-0.9,0.2-1.7,1-2.1l2-1.1c-0.6-1.3-1.5-2.5-2.6-3.5l-1.6,1.5c-0.6,0.7-1.6,0.9-2.3,0.4
  335.                 c-0.8-0.5-1-1.4-0.8-2.2l0.6-2.1c-1.4-0.5-2.8-0.7-4.3-0.6l0,2.2c0,0.9-0.5,1.7-1.4,1.9c-0.9,0.2-1.7-0.2-2.1-1l-1.1-2
  336.                 c-1.3,0.6-2.5,1.5-3.5,2.6l1.6,1.6c0.7,0.6,0.9,1.6,0.4,2.3c-0.5,0.8-1.4,1-2.2,0.8l-2.1-0.6c-0.5,1.4-0.7,2.8-0.6,4.3l2.2,0
  337.                 c0.9,0,1.7,0.5,1.9,1.4c0.2,0.9-0.2,1.7-1,2.1l-2,1.1c0.6,1.3,1.5,2.5,2.6,3.5l1.6-1.5c0.6-0.7,1.6-0.8,2.3-0.4
  338.                 c0.8,0.5,1,1.4,0.8,2.2l-0.6,2.1c1.4,0.5,2.8,0.7,4.3,0.6l0-2.2c0-0.9,0.5-1.7,1.4-1.9c0.9-0.2,1.7,0.2,2.1,1l1.1,2
  339.                 c1.3-0.6,2.5-1.5,3.5-2.6L52.6,77.9z M46.8,76.2c-2.5,0.6-5.1-0.9-5.8-3.4c-0.6-2.5,0.9-5.1,3.4-5.8c2.5-0.6,5.1,0.9,5.8,3.4
  340.                 C50.8,72.9,49.3,75.5,46.8,76.2z"/>
  341.             <circle class="st0" cx="80.8" cy="83.5" r="3"/>
  342.         </g>
  343.         <g>
  344.             <path class="st0" d="M172.4,92.5V47.2v-0.5h26c5.9,0,10.4,1.3,13.6,3.6l0,0c3.1,2.4,4.8,5.8,4.8,10.1l0,0c0,4.2-1.6,7.7-4.7,10.1
  345.                 l0,0c-3.1,2.4-7.6,3.6-13.4,3.6l0,0c-0.1,0-0.1,0-0.2,0l0,0l-17.3,0v18.3H172.4L172.4,92.5z M195.8,68.2c0.1,0,0.2,0,0.3,0l0,0
  346.                 c4.2,0,7.2-0.7,9.2-2l0,0c1.9-1.3,2.8-3.2,2.8-5.7l0,0c0-2.6-0.9-4.4-2.9-5.7l0,0c-2-1.3-5.1-2-9.4-2l0,0h-14.7v15.5H195.8
  347.                 L195.8,68.2z M220.5,92.5V47.2v-0.5h8.7v39.8h30.9v6H220.5L220.5,92.5z M298.1,46.7l11.2,36.5l12.8-36.5h9.1l12.6,36.5l11.6-36.5
  348.                 h8.8l-15.8,45.5l-0.1,0.3h-8.8l0,0l-13.1-37l-13.2,37h-8.8l-13.3-39.8h-17.8v39.8h-8.7l0,0V52.7h-19.4v-6H298.1z"/>
  349.             <g>
  350.                 <path class="st0" d="M104.2,62.4c0.2-0.7,0.6-1.7,0.8-2.2c2.2-4.9,6.3-12.2,11.7-12.2c3,0,4.7,2.9,4.7,7.4c0,1.1-0.2,3-0.4,4.2
  351.                     c-0.1,0.4-0.2,1-0.3,1.7l0.2,0.1c0.2-0.6,0.4-1.2,0.6-1.7c2.1-4.8,6.3-11.7,11.4-11.7c3.1,0,4.9,3,4.9,8.2
  352.                     c0,5.8-2.8,17.1-4.2,23.3c-0.2,0.8,0.2,1.1,0.6,1.1c0.6,0,1.4-0.2,2.1-0.4c0.3-0.1,0.5,0.4,0.5,0.6c0,0.1,0,0.2-0.2,0.2
  353.                     c-2.4,1.4-6.6,2-8.3,2c-0.9,0-1.5-0.5-1.5-1c0-0.5,0.1-0.9,0.2-1.1c0.9-4,3.5-17.5,3.5-22.4c0-2.3-0.5-4.5-2-4.5
  354.                     c-3.2,0-6.7,6.7-8.7,14.2c-1.4,4.9-2.5,10.7-2.7,11.8c-0.3,1.5-0.7,2.7-2.4,2.7l-3.9,0.1c-0.2,0-0.5-0.2-0.4-0.6
  355.                     c1.1-5.8,3.5-17.4,3.5-23.3c0-2.8-0.5-4.8-2-4.8c-2.8,0-6.4,6.5-8.6,14c-1,3.7-2.4,9.4-2.9,12.1c-0.3,1.4-0.8,2.5-2.4,2.5
  356.                     l-3.9,0.1c-0.2,0-0.4-0.2-0.3-0.5c0.5-2.6,1.6-10.2,2.6-17.1c0.9-6.4,1.7-11.6,1.9-13.5c0.1-1.1-0.3-1.2-0.6-1.2
  357.                     c-0.5,0-1.2,0.2-2.1,0.4c-0.3,0.1-0.8-0.4-0.8-0.6c0-0.2,0.2-0.2,0.3-0.3c1.9-0.9,6.9-2,9.6-2c1.3,0,2.1,0.5,1.7,2.4
  358.                     c-0.5,2.4-1.4,7.1-2.1,9.9c-0.1,0.5-0.2,1.2-0.4,1.9L104.2,62.4z"/>
  359.                 <path class="st0" d="M153.6,75.9c0.5-1,0.8-1.8,1.1-2.7c2.7-7,5-13.9,6.1-19.7c0.2-0.8,0.4-2.4,0.4-3.2c0-0.2,0.2-0.4,0.5-0.6
  360.                     c1.2-0.8,4.2-1.7,5.6-1.7c0.4,0,0.5,0.3,0.5,0.5c0,0.9-0.4,1.9-1.1,3.8c-2.4,5.8-9.8,21.3-14.3,29.1c-2.3,4-8.6,15.2-14.9,15.2
  361.                     c-0.9,0-1.7-0.3-2-0.8c-0.6-0.8-1-2.7-1-4.3c0-0.6,0.6-1.1,0.8-1.1c0.1,0,0.2,0,0.2,0.1c0.8,1.1,2,1.7,3.3,1.7
  362.                     c2.9,0,6.7-3,8.9-7.1c0.3-0.5,0.4-0.8,0.2-1.6c-1.2-7.3-2.8-21-3.8-31.7c0-0.8-0.5-1.2-0.9-1.2c-0.4,0-0.9,0.1-1.7,0.3
  363.                     c-0.3,0.1-0.8-0.4-0.8-0.6c0-0.2,0.2-0.2,0.3-0.3c1.9-0.9,6.7-1.9,9.7-1.9c0.8,0,1.4,0.5,1.4,2c0.2,5.5,0.6,17.2,0.9,23.6
  364.                     c0,0.7,0.1,1.4,0.1,2.3H153.6z"/>
  365.             </g>
  366.         </g>
  367.         </svg>
  368.         </div>
  369.         <div style="padding-top: 14px;">
  370.             <span> Student </span>
  371.         </div>
  372.     </div>
  373.  <div id="mainDiv">
  374.  <div class="authCenter">
  375.     <p class="loginAlert"></p>
  376.     <div class="innerDiv">
  377.     <div class="inputRow">
  378.         <div class="login-logo">Login</div>
  379.     </div>
  380.     <form id="custom_form" onsubmit="return false">
  381.       <div>
  382.         <div class="login-error-message" style="display:none;">
  383.           <div id="errorMsg">
  384.           </div>
  385.         </div>
  386.         <div class="inputRow">
  387.           <div class="inputText">
  388.       <label class="label" id="login-label">Username</label>
  389.             <input type="text" class="inputElement" role="input" name="login_username" id="login_username" value="" maxlength="60">
  390.             <span class="username_invalid error"></span>
  391.           </div>
  392.         </div>
  393.         <div class="inputRow">
  394.           <div class="inputText">
  395.          <label class="label">Password</label>
  396.             <input type="password" class="inputElement" role="input" name="login_password" id="login_password"  value="">
  397.             <span class="password_invalid error"></span>
  398.           </div>
  399.         </div>
  400.       </div>
  401.         <div class="buttonRow">
  402.             <button class="buttonPrimary" type="submit" id="login">Log in</button>
  403.             <button class="buttonSecondary" id="student-login" style="display:none;">
  404.                 I am a Student &nbsp; &gt;
  405.             </button>
  406.             <button class="buttonSecondary" id="adult-login" style="display:none;">
  407.                 Not a Student? &nbsp; &gt;
  408.             </button>
  409.         </div>
  410.         <div class="buttonRow">
  411.             <div class="logLinks">
  412.                <a href="javascript:void(0);" id="registration"> Create Account </a>
  413.                |
  414.               <a href="javascript:void(0);" id="forgotPasswordLink"> Forgot Password </a>
  415.             </div>
  416.         </div>
  417.     </form>
  418.     <form id="forgot-password" style="display:none;">
  419.         <div>
  420.         <div class="message-box success_message reset-password-message">
  421.           <div id="message">
  422.           </div>
  423.         </div>
  424.         <div class="inputRow reset-password-content">
  425.             <div class="inputText">
  426.               <span>
  427.             <p>To reset your password, please enter your email below. A link will be sent to you to reset your password.</p>
  428.             <p>If you do not receive your email, please check your spam or junk folders.</p>
  429.               </span>
  430.             </div>
  431.         </div>
  432.         <div class="inputRow">
  433.           <div class="inputText">
  434.       <label class="label bold">Email</label>
  435.             <input type="text" class="inputElement" role="input" name="forgot-username" id="forgot-email" value="" maxlength="60">
  436.             <span class="invalid_email error"></span>
  437.           </div>
  438.         </div>
  439.         <div class="buttonRow">
  440.             <div class="logButton">
  441.                 <button class="buttonPrimary forgot" type="submit" >Submit</button>
  442.             </div>
  443.         </div>
  444.       </div>
  445.     </form>
  446.   </div>
  447.   </div>
  448. </div>
  449.  
  450. <script src="https://cdn.auth0.com/js/auth0/9.6.1/auth0.min.js"></script>
  451. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js">
  452.  </script>
  453.   <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.21.0/moment.js"></script>
  454.   <footer class="footer">
  455.     <div>
  456.  
  457.         <div style="font-weight: 700;padding-left : 70px; font-size: 12px">Need help?</div>
  458.             <div style="padding-left : 70px;">
  459.                 <div class="left-content">
  460.                     Contact us at 877.335.7589 or <a href="mailto:solutioncenter@pltw.org" target="_top">solutioncenter@pltw.org</a>
  461.                 </div>
  462.                 <div class="right-content">
  463.                     <a target="_blank" rel="noopener noreferrer" href="https://www.pltw.org/program-support">Additional Resources</a>
  464.                     |
  465.                     <a target="_blank" rel="noopener noreferrer" href="https://www.pltw.org/terms-of-service">Terms of Service</a>
  466.                     |
  467.                     <a target="_blank" rel="noopener noreferrer" href="https://www.pltw.org/privacy-policy">Privacy Policy</a>
  468.                 </div>
  469.             <div id="copyright" style="font-size: 10px;"></div>
  470.         </div>
  471.     </div>
  472.   </footer>
  473.   <script>
  474. $( document ).ready(function() {
  475.   const currentYear = new Date().getFullYear();
  476.   $('#copyright').html(`&#169; ${currentYear} Project Lead The Way`);
  477.     /** constant start **/
  478.     var errors = {
  479.       'error_username_invalid':'Please enter a valid username.',
  480.       'error_username_blank':'Please enter your username.',
  481.       'error_password_blank':'Please enter your password.',
  482.       'error_wrong_credentials': 'Sorry wrong credentials.',
  483.       'error_email_blank':'Please enter your email address.',
  484.       'error_email_invalid':'Please enter a valid email address.',
  485.     };
  486.  
  487.   var MAX_LENGTH = 5;
  488.   var responseType = 'token id_token';
  489.  
  490.     //form elements
  491.     var txtUsernameId = '#login_username';
  492.     var divErrNameId = '.username_invalid';
  493.     var txtPasswordId = '#login_password';
  494.     var divErrPassId = '.password_invalid';
  495.     var btnLoginId = '#login';
  496.     var frmId = '#custom_form';
  497.     var divErrMsgId = '#errorMsg';
  498.     var classInvalid = "invalid";
  499.     var classValid = "valid";
  500.     var classError = "error";
  501.     var classErrorshow = "error_show";
  502.     var forgotPassword = "#forgot-password";
  503.     var forgotEmail = "#forgot-email";
  504.     var invalidEmail = ".invalid_email";
  505.     var message = "#message";
  506.     /** constant end **/
  507.  
  508.     /** initial setup start **/
  509.     $('#custom-form').show();
  510.     $(forgotPassword).hide();
  511.  
  512.     $('#login').click(login);
  513.     $('.forgot').on('click', forgot_password);
  514.   $('#registration').click(registration);
  515.  
  516.     $(txtUsernameId).on('input', function() {
  517.         $('.login-error-message').hide();
  518.         $(divErrMsgId).text("");
  519.         $(divErrPassId).text("");
  520.         validateUsername($(this));
  521.     });
  522.     $(txtPasswordId).on('input', function() {
  523.       $(this).removeClass(classInvalid).addClass(classValid);
  524.       $(divErrMsgId).text("");
  525.       $(divErrPassId).text("");
  526.       $('.login-error-message').hide();
  527.     });
  528.     $(forgotEmail).on('input', function() {
  529.       $(this).removeClass(classInvalid).removeClass(classValid);
  530.       $(message).text("");
  531.       $(invalidEmail).text("");
  532.     });
  533.  
  534.   $( document).on( "click", "#forgotPasswordLink", function(event) {
  535.         event.preventDefault();
  536.         $(frmId).hide();
  537.         $('.forgot').text('Submit');
  538.         $(invalidEmail).text("");
  539.     $(message).text("");
  540.         $(forgotEmail).val("").removeClass(classInvalid).removeClass(classValid);
  541.       $('.login-logo').hide();
  542.         $(forgotPassword).show();
  543.         $('.reset-password-content').show();
  544.         $('.reset-password-message').hide();
  545.     });
  546.  
  547.     /** initial setup end **/
  548.  
  549.   function getConfig() {
  550.     return JSON.parse(decodeURIComponent(escape(window.atob('eyJhc3NldHNVcmwiOiIiLCJhdXRoMERvbWFpbiI6InBsdHcuYXV0aDAuY29tIiwiYXV0aDBUZW5hbnQiOiJwbHR3IiwiY2xpZW50Q29uZmlndXJhdGlvbkJhc2VVcmwiOiJodHRwczovL2Nkbi5hdXRoMC5jb20vIiwiY2FsbGJhY2tPbkxvY2F0aW9uSGFzaCI6ZmFsc2UsImNhbGxiYWNrVVJMIjoiaHR0cHM6Ly9teS5wbHR3Lm9yZy9sb2dpbiIsImNkbiI6Imh0dHBzOi8vc2RrLmF1dGgwLmNvbS8iLCJjbGllbnRJRCI6IjNCMnBVM2JLM1plVGxoUDNvZW9lTElNQ296MDhnS25PIiwiZGljdCI6eyJzaWduaW4iOnsidGl0bGUiOiJteVBMVFctU3R1ZGVudHMifX0sImV4dHJhUGFyYW1zIjp7InByb3RvY29sIjoib2F1dGgyIiwic2NvcGUiOiJlbWFpbCIsIm5vbmNlIjoiVTJ+flFjTVVHb0x3MjMxVWlkbjBTQkFuTXRVN1NkWm0iLCJhdXRoMENsaWVudCI6ImV5SnVZVzFsSWpvaVlYVjBhREF1YW5NaUxDSjJaWEp6YVc5dUlqb2lPUzQ0TGpFaWZRPT0iLCJ0ZW5hbnQiOiJwbHR3IiwidHlwZSI6InRva2VuIGlkX3Rva2VuIiwiY2xpZW50SUQiOiIzQjJwVTNiSzNaZVRsaFAzb2VvZUxJTUNvejA4Z0tuTyIsInJlZGlyZWN0VVJJIjoiaHR0cHM6Ly9teS5wbHR3Lm9yZy9sb2dpbiIsIl9jc3JmIjoid1NEY2NORzUtS0FWa05UczI2c0IyS01zRzNlb0EwajVqYzVzIiwiX2ludHN0YXRlIjoiZGVwcmVjYXRlZCIsInN0YXRlIjoiIn0sImludGVybmFsT3B0aW9ucyI6eyJwcm90b2NvbCI6Im9hdXRoMiIsInNjb3BlIjoiZW1haWwiLCJub25jZSI6IlUyfn5RY01VR29MdzIzMVVpZG4wU0JBbk10VTdTZFptIiwiYXV0aDBDbGllbnQiOiJleUp1WVcxbElqb2lZWFYwYURBdWFuTWlMQ0oyWlhKemFXOXVJam9pT1M0NExqRWlmUT09IiwidGVuYW50IjoicGx0dyIsInR5cGUiOiJ0b2tlbiBpZF90b2tlbiIsImNsaWVudElEIjoiM0IycFUzYkszWmVUbGhQM29lb2VMSU1Db3owOGdLbk8iLCJyZWRpcmVjdFVSSSI6Imh0dHBzOi8vbXkucGx0dy5vcmcvbG9naW4iLCJfY3NyZiI6IndTRGNjTkc1LUtBVmtOVHMyNnNCMktNc0czZW9BMGo1amM1cyIsIl9pbnRzdGF0ZSI6ImRlcHJlY2F0ZWQiLCJzdGF0ZSI6IiJ9LCJ3aWRnZXRVcmwiOiJodHRwczovL2Nkbi5hdXRoMC5jb20vdzIvYXV0aDAtd2lkZ2V0LTUuMS5taW4uanMiLCJpc1RoaXJkUGFydHlDbGllbnQiOmZhbHNlLCJhdXRob3JpemF0aW9uU2VydmVyIjp7InVybCI6Imh0dHBzOi8vcGx0dy5hdXRoMC5jb20iLCJpc3N1ZXIiOiJodHRwczovL3BsdHcuYXV0aDAuY29tLyJ9fQ=='))));
  551.   }
  552.  
  553.   function getClientId() {
  554.     return getConfig()['clientID'];
  555.   }
  556.  
  557.     var config = getConfig();
  558.   console.log(config);
  559.     var studentClientId = '3B2pU3bK3ZeTlhP3oeoeLIMCoz08gKnO';
  560.     var adultClientId = 'kHPkDqheLn0HaEbOMM6OgJgLYGVKPL2U';
  561.   var studentClientIdSandbox = 'gRlCfMoeq3DlgMbai4328gxcBUXQk147';
  562.   var adultClientIdSandbox = 'fwvAU3ferREFDem2n6PZsVp3mHkpKFMm';
  563.   var delegatedAdmin = 'XQ5qNhBA49Z6eY1YMn63F51Vjx3r6TRO';
  564.   var inklingProd = 'QTBnkNIAonpoXSbBFpyYxSyfQ95Tv9GJ';
  565.   var communityProd = 'n0VgdhEBi2f0mdBIE1etR8ttBFpyMs8i';
  566.   var communitySandbox = 'xC0bCtYOxdhK0lleY6CNJyn682srmkzi';
  567.   var storeProd = 'jmTWserv6wOKwtgwffQZ2PKdQKZFSGQ5';
  568.   var storeSandbox = 'cpyrf4tqnzCLdWCzg3kku0JILhw0HYLx';
  569.   var kiteProd = '9pAhAnEfbwdBEgEmcie0XCGb7wbdg3jA';
  570.   var kiteSandbox = 'aFiHUIMXDdojSVDJFX2WgTyNWXY4DRtf';
  571.   var knowledgeProd = '0m6er1MHkInCMfcLvh2c93qljyxQS5Vr';
  572.   var knowledgeSandbox = 'VBUx7Pm6s4Z4t3Vl4MBetAyQ5eWylomG';
  573.   config.extraParams = config.extraParams || {};
  574.   var isStudentLogin = false;
  575.   var connection;
  576.   var isSandbox = false;
  577.   var isdelegatedAdmin = false;
  578.  
  579.   function getParameterByName(name, url) {
  580.     if (!url) url = window.location.href;
  581.     name = name.replace(/[\[\]]/g, "\\$&");
  582.     var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)");
  583.     var results = regex.exec(url);
  584.     if (!results) return null;
  585.     if (!results[2]) return '';
  586.     return decodeURIComponent(results[2].replace(/\+/g, " "));
  587.   }
  588.  
  589.  
  590.   function updateQueryStringParameter(uri, key, value) {
  591.     var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i");
  592.     var separator = uri.indexOf('?') !== -1 ? "&" : "?";
  593.     if (uri.match(re)) {
  594.       return uri.replace(re, '$1' + key + "=" + value + '$2');
  595.     }
  596.     else {
  597.       return uri + separator + key + "=" + value;
  598.     }
  599.   }
  600.  
  601.   if(config.clientID === adultClientId) {
  602.     connection = 'Username-Password-Authentication';
  603.     responseType = 'token id_token';
  604.   } else if(config.clientID === studentClientId) {
  605.     isStudentLogin = true;
  606.     connection = 'Student-Password-Auth';
  607.     responseType = 'token id_token';
  608.   } else if(config.clientID === adultClientIdSandbox) {
  609.     isSandbox = true;
  610.     connection = 'Username-Password-Authentication-Sandbox';
  611.     responseType = 'token id_token';
  612.     config.internalOptions.state = '';
  613.   } else if (config.clientID === studentClientIdSandbox) {
  614.     isStudentLogin = true;
  615.     isSandbox = true;
  616.     connection = 'Student-Password-Auth-Sandbox';
  617.     responseType = 'token id_token';
  618.   } else if (config.clientID === communityProd) {
  619.     connection = 'Username-Password-Authentication';
  620.     responseType = 'token id_token';
  621.   } else if (config.clientID === communitySandbox) {
  622.     isSandbox = true;
  623.     connection = 'Username-Password-Authentication-Sandbox';
  624.     responseType = 'token id_token';
  625.   } else if (config.clientID === storeProd) {
  626.     connection = 'Username-Password-Authentication';
  627.     responseType = 'token id_token';
  628.   } else if (config.clientID === storeSandbox) {
  629.     isSandbox = true;
  630.     connection = 'Username-Password-Authentication-Sandbox';
  631.     responseType = 'token id_token';
  632.   } else if (config.clientID === kiteProd) {
  633.     connection = 'Username-Password-Authentication';
  634.     responseType = 'code';
  635.   } else if (config.clientID === kiteSandbox) {
  636.     isSandbox = true;
  637.     connection = 'Username-Password-Authentication-Sandbox';
  638.     responseType = 'code';
  639.   } else if (config.clientID === delegatedAdmin) {
  640.     connection = 'Helpdesk';
  641.     responseType = 'token id_token';
  642.     isdelegatedAdmin = true;
  643.   } else if (config.clientID === inklingProd) {
  644.     connection = 'Username-Password-Authentication';
  645.     responseType = 'token id_token';
  646.  
  647.     var relayState = getParameterByName('RelayState', window.location.href) || '';
  648.     var callbackURL = 'https://pltw.auth0.com/samlp/QTBnkNIAonpoXSbBFpyYxSyfQ95Tv9GJ';
  649.     if(relayState.length > 0) {
  650.       callbackURL += '?RelayState=' + relayState;
  651.     }
  652.     config.callbackURL = callbackURL;
  653.   } else {
  654.     connection = 'Username-Password-Authentication';
  655.     responseType = 'token id_token';
  656.     config.clientID = adultClientId;
  657.     config.callbackURL = "https://my.pltw.org/login";
  658.   }
  659.  
  660.     var prompt = config.prompt;
  661.     if (isStudentLogin) {
  662.         studentLogin();
  663.     } else {
  664.         adultLogin();
  665.     }
  666.  
  667.   function login(event) {
  668.     event.preventDefault();
  669.     if(isdelegatedAdmin) {
  670.       connection = 'Helpdesk';
  671.       responseType = 'token id_token';
  672.       config.clientID = delegatedAdmin;
  673.     }
  674.  
  675.     var params = Object.assign({
  676.       domain: config.auth0Domain,
  677.       clientID: config.clientID,
  678.       redirectUri: config.callbackURL,
  679. //      responseType: (config.internalOptions || {}).response_type ||
  680. //          (config.callbackOnLocationHash ? 'token id_token' : 'code'),
  681.       responseType: responseType || 'token id_token'
  682.     }, config.internalOptions);
  683.  
  684.     var auth = new auth0.WebAuth(params);
  685.       var $this = $(this);
  686.       var uname = $(txtUsernameId);
  687.       var passwd = $(txtPasswordId);
  688.       var validated = true;
  689.  
  690.       // remove errors elements
  691.       $(divErrMsgId).text("");
  692.       uname.removeClass(classInvalid).addClass(classValid);
  693.       passwd.removeClass(classInvalid).addClass(classValid);
  694.  
  695.     var password = passwd.val();
  696.  
  697.       // Username validation
  698.         validated = validated & validateUsername(uname);
  699.  
  700.       if (!password) {
  701.           passwd.removeClass(classValid).addClass(classInvalid);
  702.           $(divErrPassId).text(errors.error_password_blank);
  703.           validated = false;
  704.           return;
  705.       }
  706.  
  707.     console.log(config.extraParams.skipLegacy);
  708.       if(validated) {
  709.           $this.prop( "disabled", true );
  710.       if (!config.extraParams.skipLegacy) {
  711.         auth.redirect.loginWithCredentials({
  712.           connection: connection,
  713.               username: uname.val(),
  714.               password: passwd.val(),
  715.           }, function(err) {
  716.               if (err) {
  717.           var msg  = err.description;
  718.           if(err.code === 'invalid_user_password') {
  719.             msg = 'The username or password you entered is incorrect, or your password may have expired. To reset your password, click <a href="javascript:void(0);" id="forgotPasswordLink"><b>here</b></a>. If you are a student, please login <a href="javascript:void(0);" id="student-login-link"><b>here</b></a>.';
  720.            } else if (err.code === 'invalid_user_password_student') {
  721.              msg = 'The username or password you entered is incorrect, or your password may have expired. Please ask your teacher to reset your password.';
  722.            }
  723.                   $(divErrMsgId).html(msg);
  724.                   $('.login-error-message').show();
  725.               }
  726.               $this.prop( "disabled", false );
  727.           });
  728.       } else {
  729.         console.log('new method -- updated');
  730.         console.log(config.extraParams.skipLegacy);
  731.       auth.login({
  732.               realm: connection,
  733. //        auth.redirect.loginWithCredentials({
  734. //        connection: connection,
  735.               username: uname.val(),
  736.               password: passwd.val(),
  737.           }, function(err) {
  738.               if (err) {
  739.           var msg  = err.description;
  740.           if(err.code === 'invalid_user_password') {
  741.             msg = 'The username or password you entered is incorrect, or your password may have expired. To reset your password, click <a href="javascript:void(0);" id="forgotPasswordLink"><b>here</b></a>. If you are a student, please login <a href="javascript:void(0);" id="student-login-link"><b>here</b></a>.';
  742.            } else if (err.code === 'invalid_user_password_student') {
  743.              msg = 'The username or password you entered is incorrect, or your password may have expired. Please ask your teacher to reset your password.';
  744.            }
  745.                   $(divErrMsgId).html(msg);
  746.                   $('.login-error-message').show();
  747.               }
  748.               $this.prop( "disabled", false );
  749.           });
  750.       }
  751.       }
  752.    }
  753.  
  754.    //forget password
  755.    function forgot_password (event) {
  756.       event.preventDefault();
  757.       var $this = $(this);
  758.       var $email = $(forgotEmail);
  759.       var $invalidEmail = $(invalidEmail);
  760.       var $message = $(message);
  761.  
  762.       $invalidEmail.text("");
  763.       $message.text("");
  764.       $email.removeClass(classInvalid).addClass(classValid);
  765.  
  766.       if ($this.text() === 'Return to Login') {
  767.           $(forgotPassword).hide();
  768.           $(frmId).show();
  769.           $(txtUsernameId).val("");
  770.         $(txtPasswordId).val("");
  771.           $('.login-logo').show();
  772.           return;
  773.       }
  774.  
  775.       if ($email.val().length === 0) {
  776.           $email.removeClass(classValid).addClass(classInvalid);
  777.           $invalidEmail.text(errors.error_email_blank);
  778.           return false;
  779.       }
  780.  
  781.      var emailRegEx = /^[a-zA-Z0-9.!#$%&'’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
  782.       if(!emailRegEx.test($email.val())) {
  783.             $email.removeClass(classValid).addClass(classInvalid);
  784.             $invalidEmail.text(errors.error_email_invalid);
  785.             return false;
  786.       }
  787.  
  788.       var data = {
  789.           "client_id" : config.clientID,
  790.         "email" : $email.val(),
  791.       "connection" : isSandbox ? "Username-Password-Authentication-Sandbox" : "Username-Password-Authentication",
  792.     };
  793.     var settings = {
  794.       "async": true,
  795.       "crossDomain": true,
  796.       "url": "https://pltw.auth0.com/dbconnections/change_password",
  797.       "method": "POST",
  798.       "headers": {
  799.         "content-type": "application/json"
  800.       },
  801.       "processData": false,
  802.       "data": JSON.stringify(data)
  803.     };
  804.  
  805.     $this.prop( "disabled", true);
  806.     var request = $.ajax(settings);
  807.  
  808.     request.done(function( response ) {
  809.       $message.text(response);
  810.       $this.prop( "disabled", false );
  811.       $this.text('Return to Login');
  812.       $('.reset-password-message').show();
  813.       $('.reset-password-content').hide();
  814.     });
  815.  
  816.     request.fail(function( jqXHR, textStatus ) {
  817.       var response =  jqXHR.responseJSON;
  818.  
  819.       if (response.code === 'reset-password') {
  820.           $message.text(response.message);
  821.       } else {
  822.           $email.removeClass(classValid).addClass(classInvalid);
  823.           $invalidEmail.text(textStatus);
  824.       }
  825.       $this.prop( "disabled", false );
  826.       $('.reset-password-message').show();
  827.     });
  828.    }
  829.  
  830.    // Registration
  831.    function registration() {
  832.      var registrationURL =  "https://my.pltw.org/registration";
  833.      if(isSandbox) {
  834.        registrationURL = "https://my-qa.pltw.org/registration";
  835.      }
  836.     window.location.href = registrationURL;
  837.    }
  838.  
  839.    // validate username
  840.    function validateUsername(uname) {
  841.       var nameRegEx = /^[a-zA-Z](?:[a-zA-Z0-9._-]*[a-zA-Z0-9])?$/;
  842.     var emailRegEx = /^[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/;
  843.       var username = uname.val();
  844.       var is_name = nameRegEx.test(username);
  845.     var is_email = emailRegEx.test(username);
  846.  
  847.       if (username.length === 0) {
  848.         uname.removeClass(classValid).addClass(classInvalid);
  849.         $(divErrNameId).text(errors.error_username_blank);
  850.         return false;
  851.       }
  852.  
  853.       if((is_name || is_email) && (username.length > MAX_LENGTH)){
  854.       uname.removeClass(classInvalid).addClass(classValid);
  855.       $(divErrNameId).text("");
  856.     }  else {
  857.       uname.removeClass(classValid).addClass(classInvalid);
  858.       $(divErrNameId).text(errors.error_username_invalid);
  859.         return false;
  860.     }
  861.       return true;
  862.    }
  863.  
  864.    function updateProdSandboxUri(clientToken){
  865. //     window.location.href = `https://pltw.auth0.com/login?client=${clientToken}`;
  866.      var uri = updateQueryStringParameter(window.location.href, 'state', '');
  867.      window.location.href = updateQueryStringParameter(uri, 'client', clientToken);
  868.    }
  869.  
  870.    $(document).on('click', '#student-login-link' , function(event) {
  871.      $('#student-login').trigger('click');
  872.    });
  873.    $(document).on('click', '#student-login', function(event) {
  874.      if (getClientId() !== inklingProd) {
  875.        if (isSandbox) updateProdSandboxUri(studentClientIdSandbox)
  876.        else updateProdSandboxUri(studentClientId)
  877.      } else {
  878.          event.preventDefault();
  879.          $(this).hide();
  880.          $('#adult-login').show();
  881.          $('.student-header').show();
  882.          $('.adult-header').hide();
  883.        $('.login-error-message').hide();
  884.          studentLogin();
  885.      }
  886.    });
  887.  
  888.   $(document).on('click', '#adult-login', function(event) {
  889.     if (getClientId() !== inklingProd && getClientId() !== kiteProd) {
  890.       if (isSandbox) updateProdSandboxUri(adultClientIdSandbox);
  891.       else updateProdSandboxUri(adultClientId)
  892.     }
  893.     else {
  894.       event.preventDefault();
  895.       $(this).hide();
  896.       $('#student-login').show();
  897.       $('.student-header').hide();
  898.       $('.adult-header').show();
  899.       adultLogin();
  900.     }
  901.    });
  902.  
  903.     function adultLogin() {
  904.         $('.logLinks').show();
  905.     if (getClientId() === inklingProd || getClientId() === kiteProd) {
  906.       connection = 'Username-Password-Authentication';
  907.     }
  908.         $('#student-login').show();
  909.     $('#login-label').text('Email or Username');
  910.     $('.null-header').hide();
  911.         $('.adult-header').show();
  912.         $('.login-logo').text('Login'+(isSandbox?' [DEVELOPMENT]':''));
  913.     }
  914.  
  915.     function studentLogin() {
  916.         $('.logLinks').hide();
  917.     if(getClientId() === inklingProd) {
  918.       connection = 'Student-Password-Auth';
  919.     }
  920.         $('#adult-login').show();
  921.     $('#login-label').text('Username');
  922.     $('.null-header').hide();
  923.         $('.student-header').show();
  924.         $('.login-logo').text('Student Login'+(isSandbox?' [DEVELOPMENT]':''));
  925.  }
  926.  
  927.     // login alert
  928. function getLoginAlerts(){
  929.   var url = '';
  930.   if(getClientId() === adultClientId || getClientId() === kiteProd){
  931.     //prod
  932.     url = 'https://services.pltw.org/alerts/loginAlerts';
  933.   } else if(getClientId() === adultClientIdSandbox) {
  934.     // dev && qa
  935.     url = 'https://services-develop.pltw.org/alerts/loginAlerts';
  936.   }
  937.  
  938.  if(url){
  939.    $.ajax({
  940.      type: "GET",
  941.      dataType: "json",
  942.      contentType: "application/json",
  943.      url: url,
  944.      success: function(obj) {
  945.        if(obj && obj.success){
  946.          if(obj.data && obj.data.length > 0){
  947.            if(obj.data[0].content__c && obj.data[0].start_date_time__c && obj.data[0].end_date_time__c){
  948.              var startDate = moment(obj.data[0].start_date_time__c).format('MM/DD/YYYY');
  949.              var endDate = moment(obj.data[0].end_date_time__c).format('MM/DD/YYYY');
  950.              var today = moment().format('MM/DD/YYYY');
  951.              if(startDate <= today && endDate >= today){
  952.                $('.loginAlert').html(obj.data[0].content__c);
  953.              }
  954.            }
  955.          }
  956.        }
  957.      },
  958.      error: function(err){},
  959.    });
  960.  }
  961. }
  962.     getLoginAlerts();
  963. });
  964.   </script>
  965. </body>
  966. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top