-
Notifications
You must be signed in to change notification settings - Fork 4.4k
🐛 Bug Report: JWT still valid after Session Timeout #8000
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
Comments
@jschmidtww, thanks for creating this issue! 🙏🏼 It looks like we check it's a valid JWT token, and there's an associated session: Lines 1199 to 1218 in b4bd48c
but we don't check the session ID to see if it's still valid like we do here: Line 1184 in b4bd48c
|
Hi @stnguyen90 can I pick this issue? before that can you confirm these things for me please |
@IshmeetSingh06, assigned! Thanks for your interest! You can do it in the block. Please also make sure to set Line 1165 in b4bd48c
|
Hello @stnguyen90 @jschmidtww I have made the changes but unfortunately I was not able to reproduce and verify the issue locally, can you list the reproduction steps it would help me a lot. |
@IshmeetSingh06, you can reproduce by:
|
@IshmeetSingh06 are you working on the issue?? |
Hi @ShivanshCharak I've worked on a possible fix but was not able to test it thoroughly due to being busy at work you can pick this up if you want to |
@IshmeetSingh06, thanks for the update! @ShivanshCharak, I've assigned this issue to you. |
@ShivanshCharak, how's your progress on this? FYI, I'll need to un-assign you soon if I don't hear back. |
I want to work on this issue. How can I set up this in my pc ? I am using ubuntu. Is unix commands work for me as per the docs? |
For contributing to appwrite, a good start can be this file: https://github.com/appwrite/appwrite/blob/main/CONTRIBUTING.md About the unix commands, it depends on the ubunutu version you're using. Common commands like ls, mkdir etc. should be available. |
Unassigned @ShivanshCharak due to inactivity. Assigned to @Suvrajit69. Thanks for your interest! 🙏🏼 Yes, you should be able to follow the contributing docs. |
I am already working on this since you were delaying 🙃 |
@Afrin127329, especially if multiple people ask to work on an issue, please do not work on it as we don't want multiple people working on the same issue and then one person's work would be wasted. |
I am working on it. |
Thanks. This issue was quite old and inactive. That's why I picked it up. Won't make anymore PRs or mentions. Don't wanna bother anyone. |
@stnguyen90 account.createJWT() does not work for me.
Also account.createSession() did not work. So I use account.createEmailPasswordSession(). Can you please check this code. |
@Suvrajit69, if you're using the web sdk, it has to be done in the browser so that the cookie or fallback header is used to persist the session for subsequent API calls. |
@Afrin127329 you can try this issue. I am giving up. |
I can't since I am not assigned. Don't worry someone else will pick this up |
@Afrin127329 If you really passionate or you said you were working on it is true. Then you should at least try and if you done raise a pr even without assigned. |
@Suvrajit69, we prefer to only have the assignee work on an issue so that multiple people don't work on the same thing leading to duplicate work. @Afrin127329, I'll assign this to you now that @Suvrajit69 doesn't want to work on this. Let me know if you aren't able to work on this and I'll unassign you. |
Please unassign |
@stnguyen90 As this issue was not assigned to anyone as per the last comment, I just inserted the change required for this issue in this PR - #8313 Ref comment - #8313 (comment) |
@stnguyen90 hey, if no one is assigned i want work on this issue. |
@stnguyen90 is it done or can i work on this? |
@stnguyen90 Hey, if nobody is working on this issue, can it be assigned to me? |
@stnguyen90, Hi hope you are doing good. Skimming through the conversation, the issue was somewhat resolved, I wanted to know, has the issue been resolved. If no, could you assign the issue to me. Thanks. |
anyone assigned? |
Uh oh!
There was an error while loading. Please reload this page.
👟 Reproduction steps
I use JWT to authenticate a user on my API server. I use the /account endpoint to verify the JWT. If the user is logged out because the session has expired, the JWT is still valid and I still get a successful response when I call /account with the user's JWT.
👍 Expected behavior
The JWT should be invalid after the user is logged out and calling /account with users JWT should throw an error.
👎 Actual Behavior
Calling /account with the users JWT gives a successful response.
Discord thread: https://discord.com/channels/564160730845151244/1221805690050445362
🎲 Appwrite version
Version 1.4.x
💻 Operating system
Linux
🧱 Your Environment
I use Self-Hosted Appwrite Version 1.4.13
👀 Have you spent some time to check if this issue has been raised before?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: