User login flow with nodeJS

Hi everyone. I am creating a ReactNative application which requires user's data from his/her apple music account. In order to retrieve user's apple music data, I understand that I need both a developer token and a user's access token with the appropriate scope for Apple Music. https://developer.apple.com/documentation/applemusicapi/user_authentication_for_musickit

I had created developer token and tested it, suggested by documentation https://developer.apple.com/documentation/applemusicapi/generating_developer_tokens

For user's login, I am creating login URL with the npm package apple-auth and configuration object is

export const con: any = {
  client_id: clientId,
  team_id: teamId,
  key_id: keyId,
  redirect_uri: "https://api.borrow4less.ca/api/v1/welcome",
  scope: "email",
};

I registered a service identifier for domain/subdomain and returnURL. when I go the login url it shows

login url is :https://appleid.apple.com/auth/authorize?response_type=code%20id_token&client_id=com.QueueMusic&redirect_uri=https://api.borrow4less.ca/api/v1/welcome&state=489612589c&scope=email&response_mode=form_post

Invalid client id or web redirect url.

I would greatly appreciate any guidance or insights from the community regarding the correct configuration object to use with "apple-auth" or any alternative.

Regards

User login flow with nodeJS
 
 
Q