org.springframework.security.oauth2.common.exceptions.InvalidGrantException: Unauthorized grant type: refresh_token>org.springframework.security.oauth2.common.exceptions.InvalidGrantException: Unauthorized grant type: refresh_token

Spring JIRA | Andrea Chiodoni | 6 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    I'm testing sparklr2 and tonr2. Here is what's happening: - log into tonr2 as marissa - click view photos - log into sparklr2 as marissa - grant access - photos are on tonr2 as expected Now, restart the browser - log into tonr2 as marissa again - click view photos - The tonr2 login page come again and I'm not able proceed. If at this point I restart tonr2, it works again. On tonr2 console: [WARN] RestTemplate - POST request for "http://localhost:8080/sparklr/oauth/authorize" resulted in 401 (Unauthorized); invoking error handler On sparklr2 console: [DEBUG] ProviderManager - Authentication attempt using org.springframework.security.oauth2.provider.refresh.RefreshAuthenticationProvider [DEBUG] ProviderManager - Authentication attempt using org.springframework.security.oauth2.provider.AccessGrantAuthenticationProvider [DEBUG] OAuth2ExceptionHandlerFilter - OAuth error. <org.springframework.security.oauth2.common.exceptions.InvalidGrantException: Unauthorized grant type: refresh_token>org.springframework.security.oauth2.common.exceptions.InvalidGrantException: Unauthorized grant type: refresh_token at org.springframework.security.oauth2.provider.AccessGrantAuthenticationProvider.authenticate(AccessGrantAuthenticationProvider.java:57) PS: the same happen with an application I'm currently developing which is using Spring OAuth (same config as on tonr2 and sparklr2)

    Spring JIRA | 6 years ago | Andrea Chiodoni
    org.springframework.security.oauth2.common.exceptions.InvalidGrantException: Unauthorized grant type: refresh_token>org.springframework.security.oauth2.common.exceptions.InvalidGrantException: Unauthorized grant type: refresh_token
  2. 0

    I'm testing sparklr2 and tonr2. Here is what's happening: - log into tonr2 as marissa - click view photos - log into sparklr2 as marissa - grant access - photos are on tonr2 as expected Now, restart the browser - log into tonr2 as marissa again - click view photos - The tonr2 login page come again and I'm not able proceed. If at this point I restart tonr2, it works again. On tonr2 console: [WARN] RestTemplate - POST request for "http://localhost:8080/sparklr/oauth/authorize" resulted in 401 (Unauthorized); invoking error handler On sparklr2 console: [DEBUG] ProviderManager - Authentication attempt using org.springframework.security.oauth2.provider.refresh.RefreshAuthenticationProvider [DEBUG] ProviderManager - Authentication attempt using org.springframework.security.oauth2.provider.AccessGrantAuthenticationProvider [DEBUG] OAuth2ExceptionHandlerFilter - OAuth error. <org.springframework.security.oauth2.common.exceptions.InvalidGrantException: Unauthorized grant type: refresh_token>org.springframework.security.oauth2.common.exceptions.InvalidGrantException: Unauthorized grant type: refresh_token at org.springframework.security.oauth2.provider.AccessGrantAuthenticationProvider.authenticate(AccessGrantAuthenticationProvider.java:57) PS: the same happen with an application I'm currently developing which is using Spring OAuth (same config as on tonr2 and sparklr2)

    Spring JIRA | 6 years ago | Andrea Chiodoni
    org.springframework.security.oauth2.common.exceptions.InvalidGrantException: Unauthorized grant type: refresh_token>org.springframework.security.oauth2.common.exceptions.InvalidGrantException: Unauthorized grant type: refresh_token

    Root Cause Analysis

    1. org.springframework.security.oauth2.common.exceptions.InvalidGrantException

      Unauthorized grant type: refresh_token>org.springframework.security.oauth2.common.exceptions.InvalidGrantException: Unauthorized grant type: refresh_token

      at org.springframework.security.oauth2.provider.AccessGrantAuthenticationProvider.authenticate()
    2. OAuth2 for Spring Security
      AccessGrantAuthenticationProvider.authenticate
      1. org.springframework.security.oauth2.provider.AccessGrantAuthenticationProvider.authenticate(AccessGrantAuthenticationProvider.java:57)
      1 frame