Skip to content

OAuth server requires an optional parameter 'state' after 6.3.6 update (from 4.6.3) #30423

@sanyappc

Description

@sanyappc

Description:

We using Rocket.Chat as OAuth server for Wiki.js.
Authorization broke after updating Rocket.Chat to 6.3.6

Steps to reproduce:

  1. Add Rocket.Chat authentification to Wiki.js
  2. Add new OAuth Application in Rocket.Chat->Administration->OAuth Applications
  3. Try authentificate in Wiki.js with Rocket.Chat

Expected behavior:

  1. Press auth with Rocket.Chat in Wiki.js
  2. Select auth profile in Rocket.Chat
  3. Redirect to Wiki.js

Actual behavior:

  1. Press auth with Rocket.Chat in Wiki.js
  2. Select auth profile in Rocket.Chat
  3. Get an error 400

request
https://[rc]/oauth/authorize?response_type=code&redirect_uri=[redirect_uri]&scope=openid%20profile%20email&client_id=[client_id]
returns 400
{"error":"invalid_request","error_description":"Missing parameter: `state`"}

Server Setup Information:

  • Version of Rocket.Chat Server: 6.3.6
  • Operating System: debian
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: enabled
  • NodeJS Version: v14.21.3
  • MongoDB Version: 6.0.9 / wiredTiger

Additional context

It looks like after the update the 'state' property became mandatory, while it should be optional. When any state value (&state=1 as example) is appended to the url, authorization is successful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions