Skip to content

Commit 3b4f4ee

Browse files
committed
Pass uplink_domain inside the callback_url
1 parent 49a79f7 commit 3b4f4ee

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Uplink/Components/Admin/Authorize_Button_Controller.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,16 @@ private function build_auth_url( string $domain ): string {
208208
return '';
209209
}
210210

211-
$url = add_query_arg( $_GET, admin_url( $pagenow ) );
211+
$url = add_query_arg(
212+
array_filter( array_merge( $_GET, [ 'uplink_domain' => $domain ] ) ),
213+
admin_url( $pagenow )
214+
);
212215

213216
return sprintf( '%s?%s',
214217
$this->auth_url,
215-
http_build_query( array_filter( [
216-
'uplink_domain' => $domain,
218+
http_build_query( [
217219
'uplink_callback' => $this->nonce->create_url( $url ),
218-
] ) )
220+
] )
219221
);
220222
}
221223

0 commit comments

Comments
 (0)