I am working on External Third-Party OAuth 2.O integration it gives me this error
could not retrieve access token from the provider 403 ({“error”:“access.denied”,“error_description”:“Invalid client secret”})
Here it is my menifest.yml file.
modules:
jira:issueContext:
- key: resolvelogindemo-hello-world-context
resource: main
resolver:
function: resolver
title: resolveLoginDemo
label: Custom UI
function:
- key: resolver
handler: index.handler
providers:
auth:
- gotoresolve
providers:
auth:
- key: gotoresolve
name: LogMeIn
scopes:
- 'support:'
- 'identity:scim.me'
- 'identity:'
type: oauth2
clientId: <Using My Client ID>
remotes:
- resolve-apis
bearerMethod: authorization-header
actions:
authorization:
remote: resolve-account
path: /oauth/authorize
queryParameters:
client_id: <Using My Client ID>
response_type: code
redirect_uri: https://id.atlassian.com/outboundAuth/finish
exchange:
remote: resolve-oauth
path: /oauth/token
# queryParameters:
# redirect_uri: https://id.atlassian.com/outboundAuth/finish
# grant_type: authorization_code
# code:
resolvers:
accessToken: access_token
accessTokenExpires: expires_in
refreshToken: refresh_token
revokeToken:
remote: resolve-oauth
path: /oauth/token
retrieveProfile:
remote: resolve-apis
path: /oauth/authorize
resolvers:
id: id
displayName: email
avatarUrl: picture
remotes:
- key: resolve-apis
baseUrl: https://authentication.logmeininc.com
- key: resolve-account
baseUrl: https://authentication.logmeininc.com
- key: resolve-oauth
baseUrl: https://authentication.logmeininc.com
permissions:
scopes:
- 'write:jira-work'
- 'read:jira-work'
- 'storage:app'
external:
fetch:
backend:
- https://authentication.logmeininc.com
resources:
- key: main
path: static/hello-world/build
app:
id: ari:cloud:ecosystem::app/e621085e-6844-492d-9ee5-51a048ad2f72
I am doing this process.
- forge deploy
- forge providers configure gotoresolve
after this pasting Client secret
- forge install
From the Postman, I am able to successfully execute the following request.
curl --location 'https://authentication.logmeininc.com/oauth/token' \
--header 'Authorization: Basic <ClientId:ClientSecret(Base64Encoded)>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'redirect_uri=http://localhost:5000' \
--data-urlencode 'grant_type=authorization_code' \
--data-urlencode 'code=<Authorization_Code>'
In Forge manifest.yml file I am not able to set custom headers for Authorization and content type, does Forge/Jira take care for setting these headers?
Could you please help me ?