-
Notifications
You must be signed in to change notification settings - Fork 324
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: fix recreating invite link in case of expiration #9222
Conversation
@@ -85,7 +85,7 @@ const Team: GraphQLObjectType = new GraphQLObjectType<ITeam, GQLContext>({ | |||
.load(teamMemberId) | |||
const [newestInvitationToken] = invitationTokens | |||
// if the token is valid, return it | |||
if (newestInvitationToken?.expiration ?? new Date(0) > new Date()) |
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 was always false
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.
The change is fine, but does not solve the underlying problem. I could trigger the *** invite by:
- open the "Invite to Team" dialog
- stop the server
- invalidate the token
- start the server
The client reconnects but refreshes the token with ***
@Dschoordsch not able to reproduce this, am I doing this right: https://www.loom.com/share/87e349a8d825420ebacabc5881d087ea ? |
Yes, the steps were correct, I think only the slow restart of the server messed it up: https://www.loom.com/share/428542d75b5d4be0aad2d544f9b8b0bd?sid=c859c58b-64f7-4029-878d-ba02dfc8a515 |
Finally reproduced using offline mode in Network tab |
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.
Works!
* fix: fix recreating invite link in case of expiration * Fix token refetch
* fix: add suggested vscode extensions (#9382) Signed-off-by: Matt Krick <matt.krick@gmail.com> * feat: add notifications for mention in reflections and show kudos preview (#9354) * feat: add notifications for mention in reflections and show kudos preview * Fix types * chore(kudos): track kudos type and meeting type in kudosSent event (#9373) * senderName senderPicture * Fix tests * Add TODO comment to use single Mentioned notification everywhere * feat: add slack notification for mention and kudos in reflections (#9377) * feat: add notifications for mention in reflections and show kudos preview * Fix types * feat: add slack notification for mention and kudos in reflections * use const * feat: support globs for org approvals (#9367) * feat: refactor 4 sql queries to kysely Signed-off-by: Matt Krick <matt.krick@gmail.com> * feat: refactor removeApprovalOD to kysely Signed-off-by: Matt Krick <matt.krick@gmail.com> * feat: support wildcards in OrgApprovalDomains rules Signed-off-by: Matt Krick <matt.krick@gmail.com> * support org approval for invites Signed-off-by: Matt Krick <matt.krick@gmail.com> --------- Signed-off-by: Matt Krick <matt.krick@gmail.com> * feat: Release team insights (#9385) Reverse the feature flag. * feat: Allow retro meeting series naming (#9348) * feat: Add meeting series end options for retros (#9370) * feat: Add meeting series end options for retros * Add update recurrence settings modals * Stay on prettier major version 2 Don't reformat the whole codebase without reason. * Run prettier :-/ * Sneak in change for new meeting series subscription We were loading the new meeting with the activeMeetingsForTeamId dataloader which was not invalidated after the meeting was modified with the meeting series data. * await had no effect * fix: fix recreating invite link in case of expiration (#9222) * fix: fix recreating invite link in case of expiration * Fix token refetch * fix: fix slack resonse replied anonymous notification (#9390) * chore(release): release v7.15.0 (#9383) Co-authored-by: parabol-release-bot[bot] <150284312+parabol-release-bot[bot]@users.noreply.github.com> * fix(env): typo in AZURE_DEVOPS vars (#9396) * chore: update Ironbank GH action dependencies (#9393) * Update ironbank GH actions * update description * chore(deps): bump nodemailer (#9399) Signed-off-by: Matt Krick <matt.krick@gmail.com> * fix: handle all types of errors in sendToSentry (#9387) Signed-off-by: Matt Krick <matt.krick@gmail.com> * fix: fix accepting invite always required email verification (#9404) * chore(release): release v7.15.1 (#9397) Co-authored-by: parabol-release-bot[bot] <150284312+parabol-release-bot[bot]@users.noreply.github.com> --------- Signed-off-by: Matt Krick <matt.krick@gmail.com> Co-authored-by: Matt Krick <matt.krick@gmail.com> Co-authored-by: Igor Lesnenko <igor.lesnenko@gmail.com> Co-authored-by: Georg Bremer <github@dschoordsch.de> Co-authored-by: parabol-release-bot[bot] <150284312+parabol-release-bot[bot]@users.noreply.github.com> Co-authored-by: Rafa <101704572+rafaelromcar-parabol@users.noreply.github.com> Co-authored-by: Dale Bumblis <135627447+dbumblis-parabol@users.noreply.github.com>
fix #9062
I'm not exactly sure why #9062 happens.
We show dots if token is invalid, then we are fetching another token from the frontend.
I may suggest that on mobile with slow connection user may see dots for a while while we are fetching a new token.
However, this should rarely happen because if token is expired, we create new on the backend before returning it.
This mechanism was broken. I fixed it, which possibly fixes the whole issue
How to test: