0

I am writing oauth client in javascript using the page, after user enters credentials on the auth server, it tries to redirect back to my javascript page (using: window.location.replace) and fails with 'permission denied' what are the restrictions on windows.location.replace(...) ?

Javascript file is stored locally. 

ERROR Details

"permission denied" comes in IE, while Mozilla FF shows:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMLocation.replace]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location:

Asad Iqbal
  • 3,241
  • 4
  • 32
  • 52
  • Are the page and JavaScript file both stored in the same local folder? – Ja͢ck May 16 '12 at 02:34
  • @Jack yes. Client Page has inline javascript. It calls to a remote server which redirects back to local page: e.g., file:///C:/dev/oauth2-useragent/test.html – Asad Iqbal May 16 '12 at 02:36
  • Hmm, if I add that code inside a local page, only IE complains (asking whether I want to allow blocked content). FF and Chrome are fine ... guess not all systems feel the same way about local files :) – Ja͢ck May 16 '12 at 02:48

1 Answers1

1

Javascript file is stored locally.

Seems like you have to upload your file(s) to your server first!

Derek 朕會功夫
  • 92,235
  • 44
  • 185
  • 247