Skip to content

Commit

Permalink
SNOW-648958 Add support for new OKTA OIE to JDBC Driver (#1122)
Browse files Browse the repository at this point in the history
* Add support for new OKTA OIE to JDBC Driver
  • Loading branch information
sfc-gh-hchaturvedi authored Aug 23, 2022
1 parent db5bb61 commit 1658330
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/net/snowflake/client/core/SessionUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,10 @@ private static String federatedFlowStep3(SFLoginInput loginInput, String tokenUr

// session token is in the data field of the returned json response
final JsonNode jsonNode = mapper.readTree(idpResponse);
oneTimeToken = jsonNode.get("cookieToken").asText();
oneTimeToken =
jsonNode.get("sessionToken") != null
? jsonNode.get("sessionToken").asText()
: jsonNode.get("cookieToken").asText();
} catch (IOException | URISyntaxException ex) {
handleFederatedFlowError(loginInput, ex);
}
Expand Down

0 comments on commit 1658330

Please sign in to comment.