getsentry / getsentry/sentry

Use a more secure approach to the invite flow

Open
#64,707 6 comments 3 reactions 1 assignee Claimed by @mdtro View on GitHub
Improvement Product Area: Sign In
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
1d 5h
Merged PRs (30d)
624

Description

Our invite flow does not behave in a way that users generally expect. Accepting invites with an already logged in Sentry user account is not expected by most of our users. Our original intent was to make it easy for a single Sentry account to be a part of multiple organizations.

Currently, if you're already logged in to Sentry and visit the unique invite link -- you are added to that organization regardless of whether your Sentry account uses the email address that the invite was sent to. This is the unexpected behavior [users have raised concern over](https://www.linkedin.com/posts/biglan_in-general-great-product-sentry-sentryio-activity-7159255637476990976-G_PK?utm_source=share&utm_medium=member_desktop).

I'm going to revisit our invite flow and use a more secure/expected pattern.

```[tasklist]
### Tasks
- [ ] When accepting an invite while logged in, only allow the invite to be accepted if the email it was sent to is a verified email on the account
- [ ] When registering an account via an invite, only allow the intended email to signup
- [ ] Only allow sending invites if the user has a verified email on their account
- [x] Update email template to indicate that the link needs to be kept secure (e.g. do not share it)
- [ ] Update our documentation to align with the new flow
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.