Spring Security Oauth not working with Gitlab

I am using spring security oauth to integrate Gitlab oauth. Initially I was able to login via Gitlab, but now as of last week I am unable to perform the uauthentication.

I keep getting this error from spring.
org.springframework.security.oauth2.core.OAuth2AuthenticationException: [invalid_token_response] An error occurred while attempting to retrieve the OAuth 2.0 Access Token Response: 403 Forbidden.

I get the code and status from gitlab, after making the authorization. But when spring tries to make the authentication request to get the access_token, i get the above exception.

Spring Version Details:
com.springframework.boot (version 2.1.3.RELEASE)
org.springframework.security (version 5.1.4.RELEASE)