I am trying to integrate a 3rd party product using its API which supports Oauth 2.0 into my Forge app. I am facing below error after the redirection from the 3rd party platform.
Provider config in manifest file:
providers:
auth:
- key: oauthprovider
name: OauthProvider
scopes:
- "offline_access"
type: oauth2
clientId: fasdfgasdfasd
remotes:
- ls-apis
bearerMethod: authorization-header
actions:
authorization:
remote: ls-home
path: /authorize-app/asdfasdfasdfsdfgsdfg
exchange:
remote: ls-apis
path: /api/integrations/oauth/token
retrieveProfile:
remote: ls-apis
path: /
function: ls-profile
I am using a dynamic profile retriever function, below is the code for that.
import { AuthProfile } from "@forge/response";
export const retriever = (response) => {
console.log("profile response ==>", response);
return new AuthProfile({
id: "sdfsfd",
displayName: "test123123@oauthprovider.com",
});
};
I checked app logs where there is no message being logged so the above function is not getting called.
Any suggestions would be helpful.