-
Notifications
You must be signed in to change notification settings - Fork 0
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
refactor: [SIW-1176] Change decoded assertion format on iOS #17
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LazyAfternoons
changed the title
refactor: [SIW-1176] Change decoded attestation format
refactor: [SIW-1176] Change decoded assertion format
Jun 4, 2024
LazyAfternoons
changed the title
refactor: [SIW-1176] Change decoded assertion format
refactor: [SIW-1176] Change decoded assertion format on iOS
Jun 4, 2024
hevelius
requested changes
Jun 5, 2024
hevelius
requested changes
Jun 5, 2024
example/src/IosApp.tsx
Outdated
const nonce = await getChallengeFromServer(); | ||
setChallenge(nonce); | ||
const res = await getAttestation(nonce, hardwareKeyTag); | ||
setAssertion(res); |
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.
it should be setAttestation
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.
Nice catch, thank you! Fixed in e554377
Co-authored-by: Mario Perrotta <[email protected]>
hevelius
approved these changes
Jun 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short description
This PR is a followup to #10 which changes the decoded assertion format to reflect what we expect in our actual backed which requires an
authenticatorData
andsignature
as base64 strings. Currently it returns the whole decoded assertion as a base64 string. This change reduces the complexity of the verification downstream.List of Changes
decodeAssertion
implementation which now returns an object containingauthenticatorData
andsignature
as base64 encoded strings;try-catch
to prevent unhandled rejected promises in case of error;How Has This Been Tested?