Cancellation of github repo import forwards to gitlab user profile "auth"
What's the bug behaviour
when trying to import a github project, but cancelling the workflow you get redirected to gitlab.com/auth, which is a gitlab user and not an authentication callback page, probably due to a configuration mismatch.
this might be misleading for some users and is probably only a minor issue, however technically the user "auth" could use the profile feature to display fake information that might mislead unexperienced gitlab users into thinking it is an official page
Steps to reproduce:
- "import project" ( https://gitlab.com/projects/new#import_project )
- "github" (while NOT having gitlab as an authorized oauth app in github (https://github.com/settings/applications)
- press "cancel" on the github oauth authorization page https://github.com/login/oauth/authorize
OR
- Sign out from GitLab
- Go to the login page (https://gitlab.com/users/sign_in)
- Click the
GitHubbutton and enter your GH login and password if required - Click the
Cancelbutton on theAuthorize GitLab.compage
you will then get redirected to gitlab.com/auth
What is correct behaviour
After the presses "cancel" on the GitHub oauth authorization page, they should be redirected back to the project/new#import_project page.
Possible fixes
Implement additional redirect from https://gitlab.com/users/auth?error=access_denied&state=xyz to the project/new#import_project page. Utilize the state parameter to distinguish between import and non-related import OAuth (or even better - provide "return url" inside state and perform proper redirect "fixing" GitHub bug)
