Hi,
I’m creating a plugin for JIRA using Forge. Currently one of the functionalities requires authentication with Azure Devops using OAuth 2.0.
Here’s my manifest provider configuration:
providers:
auth:
- key: devops
name: DevOps
scopes:
- 'vso.code'
- 'vso.project'
- 'vso.threads_full'
type: oauth2
clientId: ***
remotes:
- devops-apis
bearerMethod: form-encoded
actions:
authorization:
remote: devops-oauth
path: oauth2/authorize
exchange:
remote: devops-oauth
path: oauth2/token
resolvers:
accessToken: access_token
accessTokenExpires: expires_in
refreshToken: refresh_token
retrieveProfile:
remote: devops-oauth
path: /_apis/profile/profiles/me?api-version=6.0
resolvers:
id: id
displayName: emailAddress
remotes:
- key: devops-oauth
baseUrl: https://app.vssps.visualstudio.com
- key: devops-apis
baseUrl: https://dev.azure.com
permissions:
content:
styles:
- unsafe-inline
scopes:
- storage:app
- read:jira-work
external:
fetch:
backend:
- 'https://app.vssps.visualstudio.com'
- 'https://dev.azure.com'
and code which runs authentication flow:
const devops = api.asUser().withProvider('devops', 'devops-apis');
if (!(await devops.hasCredentials())) {
await devops.requestCredentials();
}
Auth flow successfully acquires authorization code, however it fails during access token acquisition.
The error I get is:
could not retrieve access token from the provider
I’m looking for suggestion how to debug this error.