-
-
Notifications
You must be signed in to change notification settings - Fork 13
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(passport): account mask address #2743
Conversation
02ea3dc
to
05be9b8
Compare
8f37929
to
fe6c321
Compare
05be9b8
to
2da7a83
Compare
fe6c321
to
19514d7
Compare
2da7a83
to
9d15ad5
Compare
@@ -171,12 +173,14 @@ export const ClaimsMobileView = ({ scopes }: { scopes: any[] }) => { | |||
const RowView = ({ | |||
account, | |||
appAskedFor, | |||
masked = 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.
This doesn't seem to be used in the mobile view
@@ -527,15 +532,19 @@ export const ClaimsWideView = ({ scopes }: { scopes: any[] }) => { | |||
> | |||
{appAskedFor} | |||
</Text> | |||
{masked ? <EmailMaskedPill /> : null} |
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.
For this kind of condition there's also the && pattern: {masked && <EmailMaskedPill />}
if (!maskEmail) return | ||
if (selectedEmail?.mask) return | ||
setMaskEmailCallback() | ||
}) |
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 should have a dependency array, either an empty one: []
if its intended to run only on component mount, or possibly a [maskEmail, selectedEmail]
one if its intended to run when one of the dependencies change.
}), | ||
} | ||
|
||
setDataForScopes(newState) |
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 might be a good use case for:
setDataForScopes(prevState => ({ ...prevState, newState }));
</Pill> | ||
) | ||
|
||
export const EmailMaskedPill = () => |
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.
A more react-ish way would be to do:
export const EmailMaskedPill = () => (
<BaseEmailPill title="Masked" IconComponent={TbShield} />
);
export const EmailUnmaskedPill = () => (
<BaseEmailPill title="Unmasked" IconComponent={TbShieldOff} />
);
9d15ad5
to
90da3ad
Compare
706b2ac
to
74f5b9e
Compare
90da3ad
to
6670435
Compare
74f5b9e
to
de3f77b
Compare
cb6acf5
to
2e8f8f9
Compare
1daa218
to
dbde928
Compare
dbde928
to
e0f5e45
Compare
I've addressed most of the comments and only replied to a few. You can take another look. |
f090949
to
b4e2566
Compare
It is time to bring this home! |
25d6a71
to
b596cfe
Compare
ab22582
to
ee7e4b7
Compare
32ce4ad
to
a5a7a70
Compare
a5a7a70
to
eb79c4a
Compare
Description
Introduces mask account feature for email account type. The authorization page
has a toggle switch to mask an email account. The same email account is replaced
by the masked account in the connected accounts too. Only masked email account
is set in the authorization persona data. The user can view the source account
of a granted claim to an application in the passport authorization listing.
The mask email account address is generated when user turns on the switch. An
email account gets a designated mask address for each application. The mask
account is associated with the identity of the source account. The mask email
account is not visible to the user except for viewing the authorization claim
data.
Various modules and components has changes to provide functionality for the
complete the feature. This pull request also has some utility improvement
changes.
The removed storybook modules were failing.
Related Issues
Testing
Checklist