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

Add auth to user routes #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

nrktkt
Copy link

@nrktkt nrktkt commented Feb 23, 2021

Removed the description on createUser that said only a logged in user can create a user.
Added auth with no required scopes to log out, update user, and delete user.

It's not clear to me how security is supposed to work across the API, but these things should at least make it more consistent and sensical. I made a guess that createUser would fill the role of signing up, but it could just as easily been intended to keep the description and make it so that only a logged in user can create another user.
Requiring a token to log out makes sense, because you'd have to be logged in first.
Requiring a token to update and delete user makes the security consistent with the operation description.

Removed the description on createUser that said only a logged in user can create a user. 
Added auth with no required scopes to log out, update user, and delete user. 

It's not clear to me how security is supposed to work across the API, but these things should at least make it more consistent and sensical. I made a guess that createUser would fill the role of signing up, but it could just as easily been intended to keep the description and make it so that only a logged in user can create another user.   
Requiring a token to log out makes sense, because you'd have to be logged in first.   
Requiring a token to update and delete user makes the security consistent with the operation description.
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.

1 participant