Skip to content

Commit 3b693e8

Browse files
committed
changed auth dialog to be non-blocking
1 parent 9cdc342 commit 3b693e8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/java/com/esri/samples/map/create_and_save_map/CreateAndSaveMapController.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,11 @@ public PortalFolder fromString(String string) {
118118
*/
119119
void authenticate() {
120120

121-
Dialog<OAuthConfiguration> authenticationDialog = new AuthenticationDialog();
122-
authenticationDialog.showAndWait().ifPresent(configuration -> {
121+
AuthenticationDialog authenticationDialog = new AuthenticationDialog();
122+
authenticationDialog.show();
123+
authenticationDialog.setOnCloseRequest(r -> {
123124

125+
OAuthConfiguration configuration = authenticationDialog.getResult();
124126
AuthenticationManager.addOAuthConfiguration(configuration);
125127

126128
// setup the handler that will prompt an authentication challenge to the user

0 commit comments

Comments
 (0)