Connection.Triggers.Authorize component handles the connection authorization flow. It provides:
- Custom authorization UI integration
- Popup and redirect authorization modes
- Comprehensive callback system
- Connection state management
- Automatic popup window handling
Installation
Usage
Props
A valid React element that will trigger the authorization action. Must accept
onClick and onKeyDown event handlers.A session token for the connection. Can be provided via props or through a
Connection.Provider context.Determines how the authorization window is opened: -
popup: Opens in a new
window (default) - redirect: Redirects the current windowThe connection mode to use: -
connect: Standard OAuth connection flow -
direct: Direct connection without OAuthThe URL where the user will be redirected after authorization. Required when
windowMode is set to redirect.Additional settings to pass to the connection authorization flow.
Popup Window Behavior
When usingwindowMode="popup", the component:
- Checks if popups are allowed
- Centers the popup window on screen
- Uses standard dimensions (600x800)
- Monitors popup state
- Handles connection status updates
Internationalization
The component supports internationalization for error messages through:triggers.authorize.errors.missingTokentriggers.authorize.errors.missingMethodtriggers.authorize.errors.popupBlockedtriggers.authorize.errors.noAuthUrltriggers.authorize.errors.invalidChildren