Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.4.2: GitLab OAuth doesn't work anymore #24460

Closed
v1adislav opened this issue Feb 10, 2022 · 13 comments
Closed

4.4.2: GitLab OAuth doesn't work anymore #24460

v1adislav opened this issue Feb 10, 2022 · 13 comments

Comments

@v1adislav
Copy link

v1adislav commented Feb 10, 2022

Description:

After upgrading Rocket.Chat to version 4.4.2, OAuth no longer works with GitLab.
You get an undefined error after successful login to our self-managed GitLab instance.

Steps to reproduce:

  1. Upgrade Rocket.Chat to version 4.4.2
  2. Click login with GitLab OAuth
  3. Login into GitLab instance
  4. Undefined error triggered -> Login failed

Actual behavior:

When I try to login I get "Internal server error"

image

Server Setup Information:

  • Version of Rocket.Chat Server: 4.4.2
  • Operating System: Oracle Linux 7
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: yes
  • NodeJS Version: v14.18.2
  • MongoDB Version: 5.0.5 / wiredTiger

Client Setup Information

  • Desktop App or Browser Version: Chrome
  • Operating System: MacOS / Windows

Additional context

The GitLab-URL is set to our self hosted GitLab instance.

Relevant logs:

Exception while invoking method 'login' Error: Failed to complete OAuth handshake with gitlab at https://gitlab.com/oauth/token. failed [401] {"error":"invalid_client","error_description":"Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method

@xcore89
Copy link

xcore89 commented Feb 10, 2022

I have the same problem on version 4.4.2.

@4nt0h4
Copy link

4nt0h4 commented Feb 10, 2022

I confirm that OAuth authorization does not work

@dudanogueira
Copy link
Contributor

Hi! What are the versions you upgraded from?

this is probably related to #24355

@v1adislav
Copy link
Author

v1adislav commented Feb 10, 2022

@dudanogueira The bug started with version 4.2.2. Now I have updated from 4.4.0. How can i recover Oauth with gitlab

@ankit-jha1210
Copy link

Can I work on this issue

@ankit-jha1210
Copy link

@v1adislav can I work on this

@NeXT405
Copy link

NeXT405 commented Feb 14, 2022

Any news on this??

@g5pw
Copy link

g5pw commented Feb 14, 2022

I also have an Internal Server Error during OAuth login with Github after upgrading, I can see the following in the logs:

rocket-chat_rocketchat.1.8wy3ziw1gily@docker    | {"level":40,"time":"2022-02-14T16:26:33.799Z","pid":8,"hostname":"2750394edd44","name":"","name":"System","msg":"Automatically added ?close to 'redirect_uri' for github, this behavior will be removed in v5.0.0.\nPlease update your OAuth config to accept both with and without ?close as the 'redirect_uri'."}
rocket-chat_rocketchat.1.8wy3ziw1gily@docker    | Exception while invoking method 'login' TypeError: emails.find is not a function
rocket-chat_rocketchat.1.8wy3ziw1gily@docker    |     at Object.handleOauthRequest (packages/github-oauth/github_server.js:10:31)
rocket-chat_rocketchat.1.8wy3ziw1gily@docker    |     at OAuth._requestHandlers.<computed> (packages/oauth2/oauth2_server.js:10:33)
rocket-chat_rocketchat.1.8wy3ziw1gily@docker    |     at middleware (packages/oauth/oauth_server.js:171:5)
rocket-chat_rocketchat.1.8wy3ziw1gily@docker    |     at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40

@v1adislav
Copy link
Author

@sampaiodiego mb fix this problem?

@chriz-uniba
Copy link

I guess this is also related to #23613 --- which has some workaround that worked for us.

@cooljeanius
Copy link

This is breaking the MacPorts Rocket.Chat instance: https://lists.macports.org/pipermail/macports-users/2022-March/050863.html

@v1adislav
Copy link
Author

problem resolve in version 4.5.2

@cooljeanius
Copy link

cooljeanius commented May 8, 2022

problem resolve in version 4.5.2

But the MacPorts Rocket.Chat instance is still broken, though...

Edit: downstream issue: https://trac.macports.org/ticket/65937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants