-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix JSON login example #6276
fix JSON login example #6276
Conversation
This pull request has been mentioned on Image.sc Forum. There might be relevant details there: |
The example should probably be included in the doc. I cannot find anywhere. |
Did a big refactor to update the JavaScript code to use |
@jburel Added link from docs in ome/omero-documentation#2187 |
It works locally but I cannot get it to work using other servers |
Same output when I use |
Same problem on Firefox |
I think that the CORS issue above was due to cached data/js, but the CORS issue we're now seeing is because you need to host locally on Also, |
Hosting locally under But the
EDIT - This breaks login on webclient! Reverting... |
After updating merge-ci server with config above, I see the csrftoken cookie should be set with this header: The cookie is set, since subsequent requests include the cookie (and the same cookie is returned each time) BUT Tried another approach to include the csrf token in the
but that csrf token is different from what's in the Don't know what else to try. So it seems like we don't have a way to support |
@jburel So, I didn't manage to get it working with https, but at least if it works with http then it's an improvement on the current example code (which is actually broken), so it would still be good to get this PR merged. |
We switched to https and many did do. So not having working with https is not great. Any progress since last time you looked at the issue |
This pull request has been mentioned on Image.sc Forum. There might be relevant details there: |
Comment added to the issue #6274 |
What this PR does
Fixes #6274.
Fixes broken JSON api login example discussed at https://forum.image.sc/t/do-you-have-an-example-of/51887
EDIT: Also includes a big refactor of the JavaScript code to make it more readable and to improve usability of the example.
Testing this PR:
Go to http://localhost:8000/ in a 'private' browser tab
Enter a server address to login to. This needs to be:
Prepare Login
Log out
should log you out and re-show the login form