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

fix: correctly calculate expired_at timestamp for FlowExpired errors #2836

Merged
merged 1 commit into from
Oct 25, 2022

Conversation

zepatrik
Copy link
Member

As reported on slack:

I'm doing a verification flow, and if the flow is expired, it returns a message id#4070005, with an expired_at field available in the context. [...] According to text field, the flow is expired ~6 days ago, and the expired_at value I'm getting is in fact 'now + 6 days'.

I propose to deprecate the since field for API clients, as it obviously is pretty inaccurate (though not as noticeable by the end-user). Having consistency here makes more sense IMO.

@codecov
Copy link

codecov bot commented Oct 24, 2022

Codecov Report

Merging #2836 (fd67524) into master (4aab5e0) will decrease coverage by 0.03%.
The diff coverage is 90.00%.

@@            Coverage Diff             @@
##           master    #2836      +/-   ##
==========================================
- Coverage   75.91%   75.87%   -0.04%     
==========================================
  Files         302      302              
  Lines       17898    17824      -74     
==========================================
- Hits        13587    13524      -63     
+ Misses       3265     3262       -3     
+ Partials     1046     1038       -8     
Impacted Files Coverage Δ
selfservice/strategy/code/strategy_recovery.go 69.69% <0.00%> (ø)
selfservice/strategy/link/strategy_recovery.go 62.71% <0.00%> (ø)
selfservice/strategy/link/strategy_verification.go 58.55% <0.00%> (ø)
cmd/clidoc/main.go 65.84% <100.00%> (ø)
selfservice/flow/error.go 100.00% <100.00%> (ø)
selfservice/flow/login/error.go 72.88% <100.00%> (ø)
selfservice/flow/recovery/error.go 81.03% <100.00%> (ø)
selfservice/flow/registration/error.go 69.84% <100.00%> (ø)
selfservice/flow/settings/error.go 77.47% <100.00%> (ø)
selfservice/flow/verification/error.go 78.84% <100.00%> (ø)
... and 7 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@aeneasr aeneasr merged commit ddde43e into master Oct 25, 2022
@aeneasr aeneasr deleted the fix/flow-expired-at branch October 25, 2022 09:09
peturgeorgievv pushed a commit to senteca/kratos-fork that referenced this pull request Jun 30, 2023
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