0

We’re trying to implement a Spring Boot App to use Okta for the identity management and we’re running into some challenges. We created a demo project using this link: https://developer.okta.com/blog/2017/10/27/secure-spa-spring-boot-oauth . We’re running into an issue in the okta-spring-boot-starter jar file during YamlPropertySourceLoader.load. Essentially, there seems to be change in OktaPropertiesMappingEnvironmentPostProcessor.java file took 3 arguments in the method load, where as spring-boot-statrter parent 2.0.1.RELEASE does not have the 3rd parameter.

We’re using the following versions:

· spring boot starter parent is 2.0.1.RELEASE

· spring-security-oauth2 is 2.3.3.RELEASE

· spring-security-oauth2-autoconfigure is 2.0.0.RELEASE

· okta-spring-boot-starter is 0.2.0.RELEASE

Could you please point us to any working samples that we can use to hook in Okta with our Spring apps using the latest Spring versions?

Thanks for your help! Atreya

  • This will be fixed in the next version of the Okta Spring Boot Starter. In the meantime, you can use Spring Security OAuth directly w/o the Okta Starter. This blog post shows you how: https://developer.okta.com/blog/2017/12/04/basic-crud-angular-and-spring-boot – Matt Raible May 17 '18 at 07:22
  • I want to do auth-code flow (https://developer.okta.com/authentication-guide/implementing-authentication/auth-code), where we are having React app as client and Spring Boot as resource server. Is it possible to do without Okta Spring Boot Starter – Atreya Mukhopadhyay May 17 '18 at 08:24
  • In the example of auth code flow I got custom login example, in that example also Okta Spring Boot Starter has been used. – Atreya Mukhopadhyay May 17 '18 at 08:35
  • You can do Auth code flow if you package your React app inside your Spring Boot app. If you’re using Maven, there’s a plugin you can use. You can use Spring Security OAuth and @EnableOAuth2Sso to do it. The Okta plugin is not needed. You could also use JHipster v5, which has React + Okta + Auth Code flow. – Matt Raible May 17 '18 at 13:26
  • React app is different it is not in my Spring Boot app – Atreya Mukhopadhyay May 18 '18 at 03:56
  • As far as I know, you can’t do Authorization Code Flow with a single page app. You have to have a server side component to exchange the code for a token. – Matt Raible May 19 '18 at 15:18

0 Answers0