Skip to content

Allow set extraHeaders when calling completeAuthorizationCodeGrant #5259

@weareoutman

Description

@weareoutman

Currently matix-authentication-service recognize device type by parsing the User-Agent request header when calling token exchange endpoint, while it can't recognize a Tauri App on MacOS (Tauri doesn't override user-agent by default like Electron, so it would results as a Unknown device.

OidcClient:processSigninResponse from oidc-client-ts already supports setting extraHeaders, it would be nice completeAuthorizationCodeGrant also accepts extraHeaders as a param.

Then I can customize my own header so that MAS will recognize it correctly:

completeAuthorizationCodeGrant(
  code,
  state,
  {
    'User-Agent': 'MyApp/1.0.0'
  }
)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions