Skip to content
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

Refactor OktaSdkBridgeModule for async operations: UI thread blocking #428

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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