Skip to content

[add] /user/token to check if you are logged in#2731

Merged
kristenmills merged 2 commits intodevelopfrom
verify-auth-endpoint
Oct 3, 2020
Merged

[add] /user/token to check if you are logged in#2731
kristenmills merged 2 commits intodevelopfrom
verify-auth-endpoint

Conversation

@kristenmills
Copy link
Copy Markdown
Member

Motivation for changes:

  • Currently we use the version endpoint to determine whether or not you are logged in on webui. This initial call will block rendering of everything until resolved. The version endpoint has to call out to PyPy which is not great in places that it takes a while to resolve. So instead i made a dedicated endpoint to use for this purpose that doesn't really do anything at all other than check auth.

Addressed issues:

@kristenmills kristenmills changed the title [Add]: /auth/verify to check if you are logged in [add] /auth/verify to check if you are logged in Sep 20, 2020
@liiight
Copy link
Copy Markdown
Member

liiight commented Sep 20, 2020

I'm on board with the motivation, but adding an endpoint that basically does nothing feels kinda non idiomatic. Maybe change it to get the current user token? That feels more natural, accomplishes the same goal and also actually adds missing functionality.

@kristenmills
Copy link
Copy Markdown
Member Author

Sure i'm fine with doing that.

@kristenmills kristenmills requested a review from liiight October 2, 2020 00:26
@kristenmills
Copy link
Copy Markdown
Member Author

@liiight made a GET user/token endpoint to use instead

@kristenmills kristenmills changed the title [add] /auth/verify to check if you are logged in [add] /user/token to check if you are logged in Oct 2, 2020
Copy link
Copy Markdown
Member

@liiight liiight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kristenmills kristenmills merged commit 5e3b815 into develop Oct 3, 2020
@liiight liiight deleted the verify-auth-endpoint branch November 11, 2020 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants