Use of Okta auth.js

Hi, I am using Okta auth.js in SPA. I used sign in widget it works perfect. But i want use our okta organization login page, so i am using auth.js liabrary. I have followed the code from
https://developer.okta.com/code/javascript/okta_auth_sdk

But using above code i can see idtoken in url but unable to parse using above code. When i debug the code, i am navigating to browser.js file at point: function drainQueue() { if (draining) { return; }

Any help will be appreciated. Thanks.