kanidm / webauthn-rs

An implementation of webauthn components for Rustlang servers
Mozilla Public License 2.0
483 stars 80 forks source link

352 serde bincode #353

Closed Firstyear closed 11 months ago

Firstyear commented 11 months ago

Fixes #352 - This adds a hidden feature that allows the storage of vec to skip base64 for some users.

We can't apply this into base64urlsafedata because features taint and having a flag to skip base64 would break wasm and json front ends. So as a result, the only way to proceed is to swap the type in the struct based on the cfg flag. It is a teeny bit messy because it introduces some useless into()/from() where without the feature we are doing base64 into base64, but it's needed when the feature is enabled.

I can't think of a better way to actually achieve this though without breaking existing users horrendously. @micolous do you have any better ideas perhaps?

yaleman commented 11 months ago

looks like some of the tests are still salty about the redundant stuff..

Firstyear commented 11 months ago

Yes, I wanted some input from @micolous first before I finish tidying that up

smessmer commented 11 months ago

I believe an approach not relying on features is better. See the discussion here in and some example code here

Firstyear commented 11 months ago

Yeah. We think there are better ways.