-
-
Notifications
You must be signed in to change notification settings - Fork 18
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): keep connected account selection between signins #2363
Conversation
e3f0546
to
5759730
Compare
c57c6da
to
3cc1739
Compare
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.
Expand your test cases in the PR description.
|
||
let minDate = filteredEmailsFromConnectedAddresses[0].createdTimestamp! | ||
|
||
if (preselected) { |
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.
Not quite following what this is supposed to be doing; the edges call returns items ordered by created timestamp already. Can you not just pick the first/last, as needed?
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.
Per our conversation in chatted I assumed we wanted to double check it here. If it's not needed - removing it
done ☑️
import { getEmailIcon } from '@proofzero/utils/getNormalisedConnectedAccounts' | ||
import { ThemeContext } from '@proofzero/design-system/src/contexts/theme' | ||
import { AuthenticationScreenDefaults } from '@proofzero/design-system/src/templates/authentication/Authentication' | ||
import { Helmet } from 'react-helmet' | ||
import { getRGBColor } from '@proofzero/design-system/src/helpers' | ||
import { AddressURNSpace } from '@proofzero/urns/address' | ||
import type { DropdownSelectListItem } from '@proofzero/design-system/src/atoms/dropdown/DropdownSelectList' |
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.
Importer complaining about this import.
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.
form.append('createSCWallet', JSON.stringify({ | ||
check: true, | ||
nickname: appProfile.name | ||
})) | ||
} | ||
} | ||
|
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'm not seeing the retrieval and pre-selection of values from an existing authorization, if available (ticket #2320). Has that been implemented?
9f80d5c
to
e9123d6
Compare
e9123d6
to
9f9a4cb
Compare
request, | ||
params: { clientId }, | ||
context, | ||
}) |
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.
don't think we need non dynamic scopes
context.traceSpan | ||
) | ||
|
||
const { addressURN } = await addressClient.initSmartContractWallet.query({ |
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.
why not import the actionLoader from the current create wallet route and pass in params?
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.
or create a helper functino that both acrtion loaders can use
export const getDataForScopes = async ( | ||
requestedScope: string[], | ||
accountURN: AccountURN, | ||
jwt?: string, | ||
env?: any, | ||
traceSpan?: any | ||
traceSpan?: any, | ||
preauthorizedScopes?: GetAuthorizedAppScopesMethodResult['claimValues'] |
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.
not sure we need any of this new stuff. we can just mix in the persona data to select the values on the client
} | ||
return addressType.charAt(0).toUpperCase() + addressType.slice(1) | ||
} | ||
|
||
export const getEmailDropdownItems = ( | ||
connectedAddresses?: Addresses | null | ||
connectedAddresses?: Addresses | null, | ||
preselected = 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.
try to defer to the client to handle to select them
ae20939
to
7a69957
Compare
Description
Displays connected emails as connected accounts (it's a fix)
And also redesigns authz screen to display previously connected emails and sc wallets
Related Issues
Testing
Storybook and authz route
Checklist