Skip to content
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

Logging out should not fail if we are already logged out #511

Open
wetneb opened this issue Jul 3, 2020 · 1 comment
Open

Logging out should not fail if we are already logged out #511

wetneb opened this issue Jul 3, 2020 · 1 comment
Labels
bug good first issue Well-scoped issue that can be a good first step to get started

Comments

@wetneb
Copy link
Member

wetneb commented Jul 3, 2020

Originally posted at OpenRefine/OpenRefine#2873 by @addshore

Describe the bug

If I am logged into wikidata, but my session expires or I get logged out for some reason I can not use the log out button in the app.

Current Results

When I do click logout I see the following in the console and the app continues to think that I am logged in.

17:33:56.920 [                   refine] GET /command/wikidata/login (9487ms)
17:33:56.948 [                   refine] POST /command/core/get-all-preferences (28ms)
17:33:58.792 [                   refine] GET /command/core/get-csrf-token (1844ms)
17:33:58.807 [                   refine] POST /command/wikidata/login (15ms)
17:33:59.078 [      connection_mananger] [assertuserfailed] You are no longer logged in, so the action could not be completed. (271ms)

This is probably due to the assertuser option being used for this login call?

Expected behaviour

Clicking the logout button in this situation should detect that I am no longer logged in and thus allow me to re login to the app.

Screenshots

Stuck here in the app, can not log out

image

Desktop:

  • OS: Windows 10
  • Browser Version: Firefox 76.0.1 (64-bit)
  • JRE or JDK Version:
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

OpenRefine :

  • Version 3.3
@wetneb wetneb added bug good first issue Well-scoped issue that can be a good first step to get started labels Jul 3, 2020
@wetneb
Copy link
Member Author

wetneb commented Jul 3, 2020

I would either:

  • make sure logout calls are made without assert= parameter - but perhaps that is not a good idea: do we still want to fail if I try to logout thinking I am logged in as Mary, but in fact I am logged in as John?
  • catch assertuserfailed ourselves and pretend logout failed?
  • document that this can happen and require our users to call checkCredentials before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Well-scoped issue that can be a good first step to get started
Projects
None yet
Development

No branches or pull requests

1 participant