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
ReactElement
required
A valid React element that will trigger the authorization action. Must accept
onClick and onKeyDown event handlers.string
required
A session token for the connection. Can be provided via props or through a
Connection.Provider context.popup|redirect
default:"popup"
Determines how the authorization window is opened: -
popup: Opens in a new
window (default) - redirect: Redirects the current windowdirect|connect
default:"connect"
The connection mode to use: -
connect: Standard OAuth connection flow -
direct: Direct connection without OAuthstring
The URL where the user will be redirected after authorization. Required when
windowMode is set to redirect.object
Additional settings to pass to the connection authorization flow.
object
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