OAuth2 Service Provider only returns refresh token in some cases

Description

When using Mattermost as an OAuth 2.0 service provider, the access token endpoint only returns a refresh token if the grant type is "authorization_code" and the client does not have an active token with the specific user.

Need to fix to return refresh token for "refresh_token" grant type and all other success cases as well.

QA Test Steps

None

Mana

2

Assignee

Joram Wilander

QA Assignee

None

Reporter

Joram Wilander

Epic Link

None

Fix versions

None

Mattermost Team

None

Sprint

None

Labels

None

QA Testing Areas

None

GitHub Issue

None

Components

None

Severity

None
Configure