OAuth login for username and password not working
Gitlab Oauth login with username and password is not working as Gitlab API for username and password is updated to must-have client ID and secret as well.
Existing implementation for the method oauth2Login needs to be updated to include client Id and Secret along with username and password
Hello @UmairYasin can you point me to the right documentation about this change?
About the OAuth login for username and password not working. Which method did you use? I tried GitLabApi oauth2Login(String url, String username, char[] password) against gitlab.com and I can connect properly
Can you provide me a sample of code?
@jabby - Please have a look at the this documentation.
Also this looks to me an issue with 13.9 version because in the documentation for 13.10, clientId and secret are optional now.
I am using following GitlabApi method
oauth2Login(String url, String username, CharSequence password)
Have a look at this GitLab Issue and discussion. GitLab made a breaking change in 13.9, which was resolved in 13.10. However, there is a good chance that the resource owner password credentials flow will be disabled again at some point in the future. It would be cool if gitlab4j-api could provide some kind of support for the regular OAuth flow in future (if there is an app in GitLab, getting a URL to redirect the user to for authentication, etc.).