Authorizacion Code Flow React in React with Spring Boot Backend


Now I am receiving a token generated in fronted (REACT) but I don’t know the way to validate that in Spring Boot configuration.

I tried with that code:

public class SecurityConfig{

    private String issuer;

    public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {

            .csrf(csrf -> csrf.disable())
        .authorizeHttpRequests(authz -> {
        }).oauth2ResourceServer((oauth2) -> oauth2

    public JwtDecoder jwtDecoder() {
        return JwtDecoders.fromIssuerLocation(issuer);

With that code I can use token generated using API APP but I can’t use token generated in auth code flow from React . Why?

Thanks you!

Hi @tecnologianvs,

Welcome to the Auth0 Community!

Have you had a chance to decode your access token on to verify the payload?

If your access token is not in the JWT format, it will not work against your API. It seems that you generated a JWT token when using it for your API but not when using the authorization code flow.

In this situation, you will want to Call Your API Using the Authorization Code Flow to get a JWT access token. After that, you can validate the access token using any existing middleware.

For more information, please refer to the following documentation:

Please let me know if you have any questions.