-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
feat(auth): Add copy for account-linking verification #28931
Conversation
organization: Organization | ||
provider_name: str | ||
email: str | ||
identity_id: str |
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 hope this refactoring doesn't seem gratuitous. Otherwise, it would have been necessary to duplicate both the org and provider name between the parameter lists for the two functions, which tripped my personal "time to gather everything into a class" threshold.
The "hide whitespace changes" setting should cut down on the diff noise.
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.
looks good to me. nit about comment and ideas for further refactorings added.
src/sentry/auth/idpmigration.py
Outdated
organization=self.organization, user=self.user | ||
).id | ||
|
||
verification_code = get_random_string(32, string.ascii_letters + string.digits) |
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.
would it be worth moving verification_code
to init
(or post_init
i think since its a dataclass), and also perhaps moving the redis functionality into its own class / function?
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.
Both sound good. @maxiuyuan, we could work on those changes together?
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.
yup for sure!
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.
moving the redis functionaility to its own function is already done in another pr
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.
Yep, I'll be waiting to merge this until one or two of those dev branches are finished. I'll have to shake out a few merge conflicts but it won't be a problem.
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.
everything lgtm, do we want to move verification_code
to init
like josh suggested? if not i can approve once sasha and dave gives the final 👍 on the mock-ups
Yes, the only detail I wanted to run by you is how it changes the unit tests. |
Pass additional arguments from AuthIdentityHandler to make the message more informative. Refactor into AccountConfirmLink class to avoid passing too many params between functions.
ca91865
to
81b73ab
Compare
Ready for review. I believe we're done revising the mock-ups. @maxiuyuan The unit test changes on 81b73ab turned out not to be too complicated -- mainly it was about trading the mock injection in |
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.
lgtm!
Pass additional arguments from AuthIdentityHandler to make the message more informative.