Share via

Getting access token using refresh token but got error,

Hamza Shah 5 Reputation points
2023-06-27T08:02:28.57+00:00
9002327 - [2023-06-26 20:13:07Z]: AADSTS9002327: Tokens issued for the 'Single-Page Application' client-type may only be redeemed via cross-origin requests.\r\nTrace ID: 098495a8-6c05-4700-9648-4aec01a46300\r\nCorrelation ID: 72a970c6-2bb5-4bec-9852-8aab15ecacb4\r\nTimestamp: 2023-06-26 20:13:07Z - Correlation ID: 72a970c6-2bb5-4bec-9852-8aab15ecacb4 - Trace ID: 098495a8-6c05-4700-9648-4aec01a46300

I have generated refresh token with react library (react social login) , that will return access and refresh token , when I need to reuse refresh token and try to exchange for access token with node msl

const { PublicClientApplication, TokenCachePersistenceOptions } = require('@azure/msal-node');


const msalConfig = {
  auth: {
    clientId: 'b25666b5f-e889-4f34-a297-7221ce23426e7',
    authority: 'https://login.microsoftonline.com/0b7773f84-9143-4f82-9513-d255223ca754', // Replace {tenant} with your Azure AD tenant ID or name
  }
};

const pca = new PublicClientApplication(msalConfig);




 
Microsoft Advertising | Other
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.