Skip to content

Password provider: Rust crate for argon2id hashes - #362

Merged
Nicolapps merged 1 commit into
rebootfrom
nicolas/password-provider-rust-crate
Jul 7, 2026
Merged

Password provider: Rust crate for argon2id hashes#362
Nicolapps merged 1 commit into
rebootfrom
nicolas/password-provider-rust-crate

Conversation

@Nicolapps

@Nicolapps Nicolapps commented Jul 2, 2026

Copy link
Copy Markdown
Member

This PR is the first part of the password component described at https://app.notion.com/p/convex-dev/Convex-Auth-v2-Passwords-38ab57ff32ab80a4b395f94378ebb958?source=copy_link. As described in the design doc, we’re going to implement Argon2id hashing using a small WebAssembly module we’re going to embed in the component. This PR adds this module, while the actual component itself will be implemented in subsequent PRs.

This module is a thin wrapper around the argon2 Rust crate. It’s maintained by the RustCrypto organization and considered a “blessed” crate. The Rust code is compiled to a WebAssembly file (66 KiB1).

Footnotes

  1. The Wasm esbuild bundler in the Convex CLI encodes the contents of the Wasm file as base64, so the size of the actual module is slightly larger. If we wanted to reduce the module size, we could modify the push process to accept binary WASM files. I think the module size is fine for now, because this will only be loaded when the password component functions run, which is a small fraction of a real app workload.

@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
convex-auth-docs Error Error Jul 2, 2026 8:56pm

Request Review

Nicolapps commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@Nicolapps
Nicolapps force-pushed the nicolas/password-provider-rust-crate branch from 35b9556 to 4ec446d Compare July 2, 2026 01:31
@Nicolapps Nicolapps changed the title Password provider component [Password provider] Rust crate Jul 2, 2026
@Nicolapps Nicolapps changed the title [Password provider] Rust crate [Password provider] Rust crate for argon2id hashes Jul 2, 2026
Comment thread .github/workflows/rust-argon2.yml Fixed
@Nicolapps
Nicolapps changed the base branch from main to graphite-base/362 July 2, 2026 01:32
@Nicolapps
Nicolapps force-pushed the nicolas/password-provider-rust-crate branch from 4ec446d to 4ec2f44 Compare July 2, 2026 01:32
@Nicolapps
Nicolapps changed the base branch from graphite-base/362 to reboot July 2, 2026 01:32
@Nicolapps Nicolapps changed the title [Password provider] Rust crate for argon2id hashes Password provider: Rust crate for argon2id hashes Jul 2, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 2, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@convex-dev/auth@362

commit: 7999de5

@@ -0,0 +1,4 @@
[toolchain]
channel = "1.87.0"
targets = ["wasm32-unknown-unknown"]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using wasm32-unknown-unknown because:

  • we don't need 64 bit memory
  • wasm32-unknown-unknown is a Tier 2 without Host Tools platform (wasm64-unknown-unknown is tier 3)
  • this crate doesn’t need any assumptions about the host environment, so it’s fine to use unknown-unknown

@Nicolapps
Nicolapps force-pushed the nicolas/password-provider-rust-crate branch from 5d531bd to 9f6697b Compare July 2, 2026 07:52
@Nicolapps
Nicolapps marked this pull request as ready for review July 2, 2026 07:55
@Nicolapps
Nicolapps changed the base branch from reboot to graphite-base/362 July 2, 2026 20:20
@Nicolapps
Nicolapps force-pushed the nicolas/password-provider-rust-crate branch from 9f6697b to eaf2a69 Compare July 2, 2026 20:20
@Nicolapps
Nicolapps changed the base branch from graphite-base/362 to nicolas/fix-test-v2-ci July 2, 2026 20:20
@Nicolapps Nicolapps mentioned this pull request Jul 2, 2026
@Nicolapps
Nicolapps force-pushed the nicolas/fix-test-v2-ci branch from d91857c to 646ae43 Compare July 2, 2026 20:22
@Nicolapps
Nicolapps force-pushed the nicolas/password-provider-rust-crate branch from eaf2a69 to 3f90273 Compare July 2, 2026 20:22
@Nicolapps
Nicolapps changed the base branch from nicolas/fix-test-v2-ci to graphite-base/362 July 2, 2026 20:24
@Nicolapps
Nicolapps force-pushed the nicolas/password-provider-rust-crate branch from 3f90273 to 7a26e76 Compare July 2, 2026 20:50
@Nicolapps
Nicolapps force-pushed the graphite-base/362 branch from 646ae43 to d336421 Compare July 2, 2026 20:50
@Nicolapps
Nicolapps changed the base branch from graphite-base/362 to nicolas/fix-test-v2-ci July 2, 2026 20:50
@Nicolapps
Nicolapps requested a review from goffrie July 2, 2026 20:53
@Nicolapps
Nicolapps changed the base branch from nicolas/fix-test-v2-ci to graphite-base/362 July 2, 2026 20:54
@Nicolapps
Nicolapps force-pushed the graphite-base/362 branch from d336421 to cf62164 Compare July 2, 2026 20:54
@Nicolapps
Nicolapps force-pushed the nicolas/password-provider-rust-crate branch from 7a26e76 to 7999de5 Compare July 2, 2026 20:54
@graphite-app
graphite-app Bot changed the base branch from graphite-base/362 to reboot July 2, 2026 20:55
@Nicolapps
Nicolapps force-pushed the nicolas/password-provider-rust-crate branch 2 times, most recently from e045b77 to 7999de5 Compare July 2, 2026 20:56

@goffrie goffrie left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@Nicolapps
Nicolapps merged commit b361c49 into reboot Jul 7, 2026
16 of 21 checks passed
Nicolapps added a commit that referenced this pull request Jul 7, 2026
Starting from #360, the v2 code will depend on the WASM-compiled Rust crate added in #362. I’m making sure that we build the Rust project before running the v2 CI so that it can succeed.
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

Successfully merging this pull request may close these issues.

3 participants