Spring Ouath2 Registered Uri Redirect

I am using Spring OAuth2 to enable login with SoundCloud. I already registered my callback url. Therefore, when I use Spring OAuth2 and explicitly redirect the redirect URL, it forced me to process it manually (providing some controller for it).

I put it in application.yml:

pre-established-redirect-uri: https://localhost:8443/callback use-current-uri: false 

and I got 404 with:

 https://localhost:8443/callback?code=... 

Can I force Spring OAuth2 to automatically obtain an access token without processing a callback?

+6
source share
1 answer

I think you need to handle the callback to get the access token from the Api sound cloud. Spring messaging is useful for getting an access token without callback processing, but is only available for Facebook, Twitter, and LinkedIn. You can check this link about spring social:

http://projects.spring.io/spring-social/core.html

Just checked, it looks like someone tried to provide api sound cloud binding using spring-social. But I doubt that it is fullness. You can check this link to get an idea:

https://github.com/michaellavelle/spring-social-soundcloud

+1
source

Source: https://habr.com/ru/post/1013753/


All Articles