8000 🐛 Bug Report: `expire` is not formatted the same as other datetimes · Issue #4982 · appwrite/appwrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

🐛 Bug Report: expire is not formatted the same as other datetimes #4982

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

Closed
4 of 7 tasks
myThorsten opened this issue Jan 10, 2023 · 10 comments · Fixed by #5567 · May be fixed by #9600
Closed
4 of 7 tasks

🐛 Bug Report: expire is not formatted the same as other datetimes #4982

myThorsten opened this issue Jan 10, 2023 · 10 comments · Fixed by #5567 · May be fixed by #9600
Assignees
Labels
bug Something isn't working good first issue Good for newcomers product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.
Milestone

Comments

@myThorsten
Copy link
myThorsten commented Jan 10, 2023

👟 Reproduction steps

Today I upgraded AppWrite to 1.2.0. The migration went fine. But my client could no longer log in. I traced the problem back to a changed 'expire' format. The screenshots show the result of /v1/account/sessions/email/

The first screenshot shows the result of Version 1.2.0: "expire": "2024-01-09 21:32:12.004"
The second screenshot shows the result of Version 1.0.1: "expire": "2024-01-09T21:22:23.290+00:00"
Notice the missing 'T' and missing trailing '+00:00' which cause my parser to fail. I did not find anything in the release notes.

image

'$createdAt' has the correct format
image

👍 Expected behavior

expire should have standard format.

👎 Actual Behavior

expire does not have the standard format, breaking the parser

Other affected APIs:

🎲 Appwrite version

Version 1.2.x

💻 Operating system

Linux

🧱 Your Environment

Backend to my app

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@myThorsten myThorsten added the bug Something isn't working label Jan 10, 2023
@stnguyen90 stnguyen90 changed the title 🐛 Bug Report: 🐛 Bug Report: expire is not formatted the same as other datetimes Jan 10, 2023
@stnguyen90 stnguyen90 added the product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services. label Jan 10, 2023
@stnguyen90
Copy link
Contributor

Related issue: #4846

@stnguyen90 stnguyen90 added the good first issue Good for newcomers label Jan 10, 2023
@stnguyen90
Copy link
Contributor

To ensure the correct formatting, we should be using DateTime::formatTz() like:

if (DateTime::formatTz(DateTime::addSeconds(new \DateTime(), -APP_KEY_ACCCESS)) > $accessedAt) {

@munyoudoum
Copy link
Contributor

Can I work on this?

@vikasosmium
Copy link

I would like to work on this issue!

@stnguyen90
Copy link
Contributor

@wharl thanks for your interest, but I've assigned it to @munyoudoum since they asked first.

@stnguyen90 stnguyen90 added this to the 1.2.1 milestone Jan 12, 2023
@knight-95
Copy link

I would like to work on this issue, I am familiar with this type of issue

@stnguyen90
Copy link
Contributor
stnguyen90 commented Feb 1, 2023

Other affected APIs:

  • Create Magic URL session (confirmation)
  • Create Phone Session (confirmation)
  • Create Anonymous Session
  • Get Session
  • Update OAuth Session (Refresh Tokens)

@stnguyen90 stnguyen90 modified the milestones: 1.2.1, 1.2.2 Feb 14, 2023
@stnguyen90
Copy link
Contributor

This has been resolved for email session:

image

@Pranavtej
Copy link

I would like to work on this issue,

@fanatic75
Copy link
Contributor

@stnguyen90
if there is no separate ticket for anonymous, phone and oauth sessions bug
Should I put them in this ticket itself and in one PR?
let me know I have the PR ready

jmastr added a commit to jmastr/appwrite that referenced this issue Apr 1, 2025
closes: appwrite#4982

Signed-off-by: Julian Strobl <jmastr@mailbox.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.
Projects
None yet
7 participants
0