1

I've tried to set up an implicit authorization workflow with JavaScript SDK version 2.0:

<script type='text/javascript' src='https://api.stackexchange.com/js/2.0/all.js'></script>

I was using localhost with other parameters set up properly. Two bugs related to SE.authenticate appeared:

1. Users who have not logged in before get stuck at login_success

After the user enters his login/password at https://stackexchange.com/oauth/dialog?..., he encounters:

Application Login Failure
An error occurred while login into an application.

Error Details

error description: could not parse proxy url

at another https://stackexchange.com/oauth/dialog?....

Solution: Clicking on "Run Example With Version" (the one that calls SE.authenticate) button again. The second time, being logged in, it redirects properly and authorizes the client.

Related:

2. SE.authenticate ignores the port

I run index.html with Stack Exchange authentication on localhost:8080. Bug 1 appears again. But now calling SE.authenticate second time doesn't work. The process stops on https://stackexchange.com/oauth/login_success?... page saying Authorizing Application.

The console says:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('http://localhost') does not match the recipient window's origin ('http://localhost:8080').

Solution: Switching back to localhost(:80).

Related:

Solutions

These solutions don't address the issues directly. The problems will persist until JS SDK is fixed.

  • I have similar issues it seems. I am using apache Oltu library to setup the oauth code flow, the authorization code is being requested. But the redirection url is: localhost/seredirect/?code="code". if I manually add localhost:8444 then the whole workflow gets completed. How do I solve this problem? – Haramoz Mar 10 '18 at 17:33

You must log in to answer this question.

Browse other questions tagged .