diff --git a/src/main/java/net/tirasa/connid/bundles/googleapps/credentialsgenerator/CredentialsGeneratorApplication.java b/src/main/java/net/tirasa/connid/bundles/googleapps/credentialsgenerator/CredentialsGeneratorApplication.java index ddba883..1b9b397 100644 --- a/src/main/java/net/tirasa/connid/bundles/googleapps/credentialsgenerator/CredentialsGeneratorApplication.java +++ b/src/main/java/net/tirasa/connid/bundles/googleapps/credentialsgenerator/CredentialsGeneratorApplication.java @@ -107,7 +107,11 @@ private void getConfigurationMap(final File clientJson) throws IOException, URIS CONFIG_MAP.put("clientSecret", clientSecrets.getDetails().getClientSecret()); String requestUrl = new GoogleAuthorizationCodeRequestUrl( - clientSecrets.getDetails().getClientId(), redirectUri, SCOPES).setState("/profile").build(); + clientSecrets.getDetails().getClientId(), redirectUri, SCOPES) + .setState("/profile") + .setAccessType("offline") + .set("prompt", "consent") + .build(); LOG.info("Request Url is {}", requestUrl); if (Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {