Skip to content
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

Unable to use custom ChallengeGenerator #72

Open
dscreve opened this issue Jul 12, 2024 · 4 comments
Open

Unable to use custom ChallengeGenerator #72

dscreve opened this issue Jul 12, 2024 · 4 comments

Comments

@dscreve
Copy link

dscreve commented Jul 12, 2024

ChallengeGenerator::generate is internal...Then creation of custom ChallengeGenerator is not permitted...and WebAuthnManager::challengeGenerator is private.

@0xTim
Copy link
Member

0xTim commented Jul 12, 2024

@dscreve what are you looking to do with a custom challenge generator? It's an internal implementation detail at the moment

@dscreve
Copy link
Author

dscreve commented Jul 12, 2024 via email

@dimitribouniol
Copy link
Collaborator

dimitribouniol commented Jul 12, 2024

Nothing is preventing you from repackaging PublicKeyCredentialCreationOptions with your own challenge, though the challenge must be independently verifiable, otherwise you open yourself up to replay attacks.

ie. Just make your own codable type with similar fields. The JS side can also transform this in any way you need, the browser isn't requesting this directly.

@dscreve
Copy link
Author

dscreve commented Jul 12, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants