Skip to content

feat(sdk): Add resumeAuthFlow to recover auth flows after page refresh#355

Open
tipogi wants to merge 2 commits intomainfrom
fix/resume-auth-link
Open

feat(sdk): Add resumeAuthFlow to recover auth flows after page refresh#355
tipogi wants to merge 2 commits intomainfrom
fix/resume-auth-link

Conversation

@tipogi
Copy link
Contributor

@tipogi tipogi commented Mar 24, 2026

Summary

  • Add resume_auth_flow(url) to the core Pubky facade and JS/WASM bindings, allowing an app to reconnect to an in-progress auth flow using a previously saved authorizationUrl
  • Parse the secret, capabilities, relay, and flow kind from the persisted URL and rebuild the PubkyAuthFlow against the same relay channel — if the signer already approved, the first poll returns a session immediately
  • Add Rust unit tests (signin + signup resume, invalid URL rejection, seed-export rejection) and JS integration tests covering the full round-trip including .free() to simulate WASM memory loss

@tipogi tipogi requested a review from SHAcollision March 24, 2026 07:40
@tipogi tipogi self-assigned this Mar 24, 2026
@tipogi tipogi added enhancement New feature or request authz Authorization and permissions labels Mar 24, 2026
@tipogi tipogi removed the request for review from SHAcollision March 24, 2026 07:40
@tipogi tipogi linked an issue Mar 24, 2026 that may be closed by this pull request
@tipogi tipogi marked this pull request as ready for review March 24, 2026 11:11
@tipogi tipogi requested a review from SHAcollision March 24, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

authz Authorization and permissions enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AuthFlow cannot be resumed after a page refresh

1 participant