Using Redirects
Learn how to configure and handle redirects instead of popups in the Nimiq Hub API.
Configuring Top-Level Redirects
You can use redirects instead of popups by providing a RedirectRequestBehavior
instance:
HTTPS Required
Your app must run under HTTPS to use redirects!
API Changes
The redirect configuration API may change in future versions.
RedirectRequestBehavior Configuration
The RedirectRequestBehavior
constructor accepts two optional parameters:
If no return URL is specified, the current URL without parameters will be used.
Handling Redirect Responses
When using redirects, follow these steps to handle responses from the Hub:
Available Request Types
The Hub API provides these request types for redirect handling:
Each request type corresponds to its respective API method and should be used when setting up redirect response listeners.