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
fixed bug the treat as same as no cookie if existing cookie vas invalid. #23915
fixed bug the treat as same as no cookie if existing cookie vas invalid. #23915
Conversation
Changed Packages
|
Uffizzi Cluster |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 👍
Ah, yep the current implementation here isn't right. I think we might change this up a bit more and possibly get rid of the optimization to not refresh cookies that aren't about to expire altogether. Either way we can ship this for now, with a small tweak
return existingCredentials.expiresAt; | ||
return existingCredentials.expiresAt; | ||
} catch (error) { | ||
if (error instanceof AuthenticationError) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check isn't safe, use error.name === 'AuthenticationError'
instead, to be able to handle the case where @backstage/errors
is duplicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll fix it too.
.changeset/giant-olives-protect.md
Outdated
'@backstage/backend-app-api': patch | ||
--- | ||
|
||
fixed bug the treat as same as no cookie if existing cookie vas invalid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed bug the treat as same as no cookie if existing cookie vas invalid. | |
Fixed a bug where expired cookies would not be refreshed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry about my poor English.
I'll fix it.
Signed-off-by: Hitoshi Kamezaki <kamezaki@ap-com.co.jp> update
f62d074
to
7e584d6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 👍
Let's
Thank you for contributing to Backstage! The changes in this pull request will be part of the |
Hey, I just made a Pull Request!
I've got error at /api/techdocs/cookie when I restarted backstage backend.
It was happend on the develop environment (using on-memory database).
It seemd it was happend because backend could not find the kid of JWT in the key store.
how to reproduce it.
This pr is for #23914
✔️ Checklist
Signed-off-by
line in the message. (more info)