Skip to content

feat: add connected accounts callback handling#817

Open
yogeshchoudhary147 wants to merge 1 commit intomainfrom
feat/connected-accounts-callback-handling
Open

feat: add connected accounts callback handling#817
yogeshchoudhary147 wants to merge 1 commit intomainfrom
feat/connected-accounts-callback-handling

Conversation

@yogeshchoudhary147
Copy link
Contributor

Description

Adds callback handling for connected accounts, completing the implementation started in #767.

Previously, the SDK could initiate the connect flow with connectAccountWithRedirect() but couldn't process the response when users returned from connecting their account. This PR adds the missing callback logic.

Changes

  • Update AppState interface with connectedAccount and response_type fields
  • Export ConnectedAccount, ResponseType, ConnectError, and ConnectAccountRedirectResult types
  • Detect connect_code parameter in callback URL (in addition to code)
  • Extract connected account data from redirect result and add to appState$
  • Add tests for callback handling (4 new tests, 131 total passing)
  • Update documentation showing how to access connected account data

Usage

After connecting an account, access the details via appState$:

this.auth.appState$.subscribe((appState) => {
  if (appState.connectedAccount) {
    console.log('Connected:', appState.connectedAccount.connection);
  }
});

Testing

  • ✅ All tests pass (131 total)
  • ✅ Production build successful
  • ✅ Types exported correctly

@yogeshchoudhary147 yogeshchoudhary147 requested a review from a team as a code owner February 16, 2026 14:01
@yogeshchoudhary147 yogeshchoudhary147 force-pushed the feat/connected-accounts-callback-handling branch 2 times, most recently from 1486779 to a763c05 Compare February 17, 2026 04:29
- Add ConnectedAccount type and update AppState interface
- Export ResponseType, ConnectError, and ConnectAccountRedirectResult
- Update handleRedirectCallback to extract connected account data
- Add connect_code parameter detection in shouldHandleCallback
- Add comprehensive test coverage for callback handling
- Update documentation with connected accounts usage examples
@yogeshchoudhary147 yogeshchoudhary147 force-pushed the feat/connected-accounts-callback-handling branch from a763c05 to 817f1de Compare February 18, 2026 08:24
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

Comments