Skip to content

Conversation

@anujsachan1990
Copy link

Refactor OktaSdkBridgeModule for improved asynchronous operations

  • Implement ExecutorService for background tasks
  • Add Handler for main thread operations
  • Refactor methods to use asynchronous pattern:
    • createConfig
    • signIn
    • authenticate
    • (other relevant methods)
  • Improve error handling and thread safety
  • Add proper resource management with executor shutdown
  • Enhance overall code consistency and maintainability
  • Update comments to explain new asynchronous approach

This refactor aims to improve performance, responsiveness, and
reliability of the Okta SDK Bridge module while maintaining
compatibility with existing React Native integration.

Addresses issue where certain operations (createConfig, signIn,
authenticate, etc.) could potentially block the UI thread on some
devices, leading to unresponsive app behavior. By moving these
operations to background threads, we ensure a smoother user
experience across all devices, particularly those with limited
resources or slower network connections.

@anujsachan1990 anujsachan1990 changed the title Refactor OktaSdkBridgeModule for async operations Refactor OktaSdkBridgeModule for async operations: UI thread blocking Sep 6, 2024
Copy link

@Brencheva Brencheva left a comment

Choose a reason for hiding this comment

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

Great work!

Copy link

@testerncoder testerncoder left a comment

Choose a reason for hiding this comment

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

nice

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.

4 participants