Coder Social home page Coder Social logo

Comments (8)

mraible avatar mraible commented on June 29, 2024

I was able to workaround this problem by downgrading to 0.1.0. However, I did find that I'm unable to use @CrossOrigin to enable cross-origin requests. Instead, I have to create a CorsFilter.

@Bean
public FilterRegistrationBean simpleCorsFilter() {
    UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
    CorsConfiguration config = new CorsConfiguration();
    config.setAllowCredentials(true);
    config.setAllowedOrigins(Collections.singletonList("http://localhost:4200"));
    config.setAllowedMethods(Collections.singletonList("*"));
    config.setAllowedHeaders(Collections.singletonList("*"));
    source.registerCorsConfiguration("/**", config);
    FilterRegistrationBean bean = new FilterRegistrationBean(new CorsFilter(source));
    bean.setOrder(Ordered.HIGHEST_PRECEDENCE);
    return bean;
}

from okta-spring-boot.

Prophet32j avatar Prophet32j commented on June 29, 2024

0.1.0 isn't listed on Maven. How are we getting past this? I need to secure routes and API endpoints.

from okta-spring-boot.

dogeared avatar dogeared commented on June 29, 2024

from okta-spring-boot.

Prophet32j avatar Prophet32j commented on June 29, 2024

from okta-spring-boot.

Prophet32j avatar Prophet32j commented on June 29, 2024

Yeah that fixed not being able to start. Thanks.

from okta-spring-boot.

mraible avatar mraible commented on June 29, 2024

I tried to reproduce this again today with a new project from start.spring.io and everything seems to work fine. I even added devtools back in and it still works.

from okta-spring-boot.

Prophet32j avatar Prophet32j commented on June 29, 2024

what were your versions you used?

from okta-spring-boot.

mraible avatar mraible commented on June 29, 2024

@Prophet32j Spring Boot 1.5.8 and okta-spring-boot-starter 0.2.0. There does seem to be an issue when using Spring Boot 2.0. I found that reverting to okta-spring-security-starter 0.1.0 solved this problem.

from okta-spring-boot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.