-
Notifications
You must be signed in to change notification settings - Fork 5
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
CP-9607: update android passkey implementation #2192
Conversation
@@ -182,7 +182,7 @@ export const useSeedlessRegister = (): ReturnType => { | |||
await SeedlessService.sessionManager.approveFido( | |||
oidcAuth.oidcToken, | |||
oidcAuth.mfaId, | |||
false | |||
true |
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 be true
instead, if we don't know it is yubikey/passkey, we want to prompt both options to them.
await sessionManager.approveFido( | ||
oidcToken, | ||
mfaId, | ||
false //FIXME: this parameter is not needed, should refactor approveFido to remove it, |
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 be true
instead, if we don't know it is yubikey/passkey, we want to prompt both options to them.
? decodedResult.response.signature | ||
: '' | ||
) as Buffer, | ||
userHandle: base64UrlToBuffer( |
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.
userHandle is null when authenticating with yubikey, so we check userhandle is in the reponse, if not, simply use empty string to convert to empty buffer.
packages/core-mobile/app/new/features/onboarding/hooks/useSeedlessManageMFA.ts
Outdated
Show resolved
Hide resolved
packages/core-mobile/app/new/features/onboarding/components/FidoNameInput.tsx
Outdated
Show resolved
Hide resolved
export default function FidoLayout(): JSX.Element { | ||
return ( | ||
<Stack> | ||
<Stack.Screen name="fidoNameInput" /> |
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.
Should we have separate layouts for (fido) and (totp)? I was wondering if we could just include them in the seedless stack and show a page indicator based on each type. However, this might be challenging since the total number of steps could vary depending on the user’s decisions.
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.
you mean we should show X + 1 (fido) and X + 4 (totp) for the onboarding flow?
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.
Theoretically, yes. But I’m skeptical about how well we can implement it.
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 feel like this is going to over complicate the logic, we need to re-render the pageControl if we are onboarding user who has existing seedless account but hasn't setup recovery method, or if user chooses to skip the recovery method setup or chose totp and back to addRecoveryMethod screen and chooses fido instead.
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.
Exactly. The number of flow screens changes dynamically based on user actions, so implementing it could get complex. So, did the design team approve doing it this way?
df805b1
to
af29080
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.
🔥
Description
Changes done outside of mobile repo
cs org get
(you will need to authenticate first) *we will need to make sure these org policy update is deploy from gamma to production prior to releasing this updateTicket: CP-9607
Screenshots/Videos
onboarding with android passkey and verifying android passkey
az_recorder_20250117_102851.mp4
Checklist
Please check all that apply (if applicable)