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

Improve expired invite experience #1906

Closed
Shrinks99 opened this issue Jul 1, 2024 · 3 comments
Closed

Improve expired invite experience #1906

Shrinks99 opened this issue Jul 1, 2024 · 3 comments
Assignees
Labels
back end Requires back end dev work front end Requires front end dev work

Comments

@Shrinks99
Copy link
Member

Context

Invites expire after a set amount of time for security reasons, but some users don't get around to them in time. How can we ensure that folks who miss their invite link still get to the org they intended to?

Requirements

  • Users who miss their invite should be taken to a page telling them their invite expired and to contact their org admin
  • Admins should see a list of invitations that have expired in the members panel alongside pending and users
    • Expired invites table should list emails, the expiry date, and the role they were to be given (as a dropdown).
    • Expired invites table should have two actions, one to delete the invite and another to resend it.
@Shrinks99 Shrinks99 added the front end Requires front end dev work label Jul 1, 2024
@Shrinks99 Shrinks99 added the back end Requires back end dev work label Jul 1, 2024
@emma-sg
Copy link
Member

emma-sg commented Jul 1, 2024

Backend/DB todos

  • Set InvitePending#created in backend explicitly, rather than relying on frontend
  • Implement TTL check from InvitePending#created field on every invite access/get

For initial user re-invites

  • Endpoint to re-create an invite from an existing invite (only if org for original invite has zero users)
  • Add "initial user"/"can re-create expired invites" boolean to endpoints used on initial render of invite accept page

For multi-user orgs

  • Endpoint to get expired invites
  • Endpoint to recreate existing invite using admin auth

@ikreymer
Copy link
Member

ikreymer commented Jul 2, 2024

[ ] Set InvitePending#created in backend explicitly, rather than relying on frontend
[ ] Implement TTL check from InvitePending#created field on every invite access/get

This is already set on https://github.com/webrecorder/browsertrix/blob/main/backend/btrixcloud/invites.py#L198
There is also an expiring index so that the invites auto-expire: https://github.com/webrecorder/browsertrix/blob/main/backend/btrixcloud/invites.py#L54

  • Users who miss their invite should be taken to a page telling them their invite expired and to contact their org admin

  • Admins should see a list of invitations that have expired in the members panel alongside pending and users

    • Expired invites table should list emails, the expiry date, and the role they were to be given (as a dropdown).
    • Expired invites table should have two actions, one to delete the invite and another to resend it.

This isn't something that we need at this point, as the invite system is something that is used fairly rarely.

We just want to improve the error message, so if an invite is invalid, we should just say something like: 'This invite is not valid. If you've received this invite a while ago, it may have expired. If you believe this may have happened. Please contact support / your Browsertrix Admin to request a new invite'

I think that's the extent of what we should do now to address this issue.

@ikreymer
Copy link
Member

ikreymer commented Jul 3, 2024

For clarity, closing this issue in favor of #1912 which provides additional details on improvements + bug.

@ikreymer ikreymer closed this as not planned Won't fix, can't repro, duplicate, stale Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back end Requires back end dev work front end Requires front end dev work
Projects
Status: Done!
Development

No branches or pull requests

3 participants