-
Notifications
You must be signed in to change notification settings - Fork 53
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
Correct handling of malformed tokens with compliant 401 response according to RFC 6750 #118
base: user-tokens
Are you sure you want to change the base?
Conversation
I like this a lot. The only thing we lose is any messaging around expired tokens, which I think can be especially helpful for debugging purposes. Would it break the spec to return a message like |
Firebase actually throws 2 messages on validation one is token expired the other one is JSON malformed. This could be implemented as a json response following the graphql style. |
Interesting, this is all really helpful, thanks! Do you happen to have a link to where this is in the Firebase docs? I'd love to learn from it. In the meantime I'll take a look at what sort of messaging we can change here. |
nope, there are no docs about exceptions, if you remove the try catch block. you get the stack trace of the two classes. |
i would like to see it happen that the user-token branch gets merged in the official repo in the next months. We work on a project where craftql fits in perfectly and saves us tons of time. |
Yup, that seems doable. I'd like to get it merged by the end of July, but that might be tight with some other things competing for my time. Certainly by the end of August though. If there's a specific date or need feel free to email me directly (email is on my GitHub profile) and we can discuss. |
August fits perfectly. i have ideas some which maybe worth considering, i will send you an email later. |
invalid_token
The access token provided is expired, revoked, malformed, or invalid for other reasons. The resource SHOULD respond with the HTTP 401 (Unauthorized) status code. The client MAY request a new access token and retry the protected resource request.