Open gaurav2887 opened 6 years ago
Try first to autowire using the qualifier as follows
@Autowired @qualifier("oauth2ClientContext") OAuth2ClientContext oAuth2ClientContext;
A very strange thing. I hope this will be fixed. Kotlin:
@Autowired @Qualifier("oauth2ClientContext") private val oauth2ClientContext: OAuth2ClientContext
I was having same issue, it turns out that I forgot to add follow properties:
security:
oauth2:
client:
clientId: bd1c0a783ccdd1c9b9e4
clientSecret: 1a9030fbca47a5b2c28e92f19050bb77824b5ad1
accessTokenUri: https://github.com/login/oauth/access_token
userAuthorizationUri: https://github.com/login/oauth/authorize
clientAuthenticationScheme: form
as specified in docs spring-security-oauth2
In oauth2 client , it's showing error for not able to resolve OAuth2ClientContext injection in the following code. Error: 'Could not autowire. There is more than one bean of OAuth2ClientContext Type'. Any solution?