Skip to content

feat(calling): periodic token refresh#4874

Open
Kesari3008 wants to merge 11 commits intowebex:mobius-socketfrom
Kesari3008:CAI-7724
Open

feat(calling): periodic token refresh#4874
Kesari3008 wants to merge 11 commits intowebex:mobius-socketfrom
Kesari3008:CAI-7724

Conversation

@Kesari3008
Copy link
Copy Markdown
Contributor

COMPLETES #CAI-7724

This pull request addresses

Added new refresh method within the socket layer to refresh the token.

by making the following changes

Added new refresh method within the socket layer to refresh the token.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Please Specify
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

I certified that

  • I have read and followed contributing guidelines
  • I discussed changes with code owners prior to submitting this pull request
  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the documentation accordingly

Make sure to have followed the contributing guidelines before submitting.

@Kesari3008 Kesari3008 added the validated If the pull request is validated for automation. label Apr 17, 2026
@Kesari3008 Kesari3008 requested a review from a team as a code owner April 17, 2026 14:09
@Kesari3008 Kesari3008 changed the base branch from next to mobius-socket April 17, 2026 14:09
@chatgpt-codex-connector
Copy link
Copy Markdown

💡 Codex Review

// Temporary testing override until catalog URI is available.
webSocketUrl = TEST_MOBIUS_WEBSOCKET_URL;

P1 Badge Use discovered socket URL when no explicit URL is passed

_prepareUrl() now falls back to a hardcoded test endpoint when webSocketUrl is missing, and shutdown switchover paths call reconnect without an explicit URL. In that path the client will attempt to connect to mobius.aload-calling1... instead of the discovered production cluster, so switchover/recovery can fail even when valid Mobius URIs were previously available.


this.apiRequest = APIRequest.getInstance({webex: this.webex});

P2 Badge Pass SDK Mobius-socket override into APIRequest

CallingClientConfig now exposes isMobiusSocketEnabled, and this constructor computes that value, but APIRequest is instantiated without forwarding it. As a result, environments relying on the SDK override (with WDM flag still false) will connect a Mobius socket yet continue routing requests over HTTP, so the new websocket transport/refresh path is never actually used.


if (mobiusSocketInstance) {
return mobiusSocketInstance;

P2 Badge Bind socket singleton to the current Webex instance

This factory returns the first created mobiusSocketInstance for all subsequent calls, regardless of the webex argument. If a second Webex client is created (for example logout/login or parallel tenants), it will reuse a socket bound to the first client’s parent/credentials, which can route events and auth over the wrong session.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@aws-amplify-us-east-2
Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-4874.d3m3l2kee0btzx.amplifyapp.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mobius-wss validated If the pull request is validated for automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants