Skip to content

Allow account linking via a code #8358

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ivan-jukic
Copy link
Contributor

Adds a feature to create account linking codes. These will be used with native apps to link existing accounts to the passkeys created on these devices.

Copy link

github-actions bot commented Jul 16, 2025

canbench 🏋 (dir: .)

./canbench_results.yml is up to date ✅

---------------------------------------------------

Benchmark: push_simple_text_messages
  total:
    instructions: 207.81 M (-0.22%) (change within noise threshold)
    heap_increase: 13 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

Benchmark: add_reactions
  total:
    instructions: 1.23 B (-0.05%) (change within noise threshold)
    heap_increase: 4 pages (no change)
    stable_memory_increase: 0 pages (no change)

---------------------------------------------------

---
Adds a feature to create account linking codes. These will be used with
native apps to link existing accounts to the passkeys created on these
devices.
@ivan-jukic ivan-jukic force-pushed the native/connect-with-otp branch from a7ee110 to 254e6c6 Compare July 17, 2025 18:19
//
// ---- Initialise new identity to link ----
//
let (new_principal, new_pub_key) = random_delegated_principal(canister_ids.sign_in_with_email);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm slightly confused about the requirements for the canister id here. It's later validated on the backend, and it must be from expected set of canister ids. Could anyone shed a bit of light on this?

I've not used Webauthn key here, would that yield a different result if I had used a different canister id here?

@@ -49,6 +49,6 @@ function cleanup() {

trap cleanup EXIT

cargo test --package integration_tests $TESTNAME -- --test-threads $TEST_THREADS || exit 1
cargo test --package integration_tests $TESTNAME -- --nocapture --test-threads $TEST_THREADS || exit 1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could we keep this 🤔 ? I find it useful sometimes if I want to println! something in the test... Is there a different way you'd recommend?

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.

1 participant