title: Failed to execute 'atob' on 'Window'The string to be decoded is not correctly encoded
body: <p>Here, In my code res is my variable name and i am trying to stringify them 
      using sso  atob but i am not able to do this because of this below error 
      which i am facing.</p>
  
  <pre><code>var baseUrl = window.location.origin + '/index.html/login';
  
      var res = JSON.stringify(JSON.parse(atob($stateParams.authUrl.split('\.')
          [1])), null, '  ');
          res = JSON.parse(res);
  </code></pre>
  
  <p>Error: Failed to execute 'atob' on 'Window': The string to be decoded is not 
      correctly encoded.</p>