Alejandro Miranda
Alejandro Miranda

Reputation: 1

CORS error in Azure B2C when redirect automatically

we have an Azure B2C tenant with custom policies and we are facing a problem. We have a portal web where in some sites there are sensitive information that only logged users should se so we want that when user go to this site automatically redirect to Azure B2C for log in but the redirect is not working and its showing this error:

Access to XMLHttpRequest at 'https://XXXXXXXXX.b2clogin.com/XXXXXXXXXX.onmicrosoft.com/oauth2/v2.0/authorize?p=B2C_1A_SIGNUP_SIGNIN&client_id=c94c14cd-4efc-4c34-a70b-f88e9aa5877b&redirect_uri=https://XXXXXXXXX/XXX/XX/inici.html&scope=openid%20offline_access&response_type=code&promt=login&response_mode=query&ui_locales=ca&origin=https://XXXXXXX/XXX/XX/XXXXX/XXXXXX?eventId=a0da3b0e-90e2-4b8a-95ca-f50654ec9bd6&languageId=51d9383e-1039-ed11-9db1-00224899347c' (redirected from 'https://XXXXXXXXX/XXXXX/XXXXXX/XXXX/XXXXX/XXXXXXXX/jcr:content.user-info.json?eventId=a0da3b0e-90e2-4b8a-95ca-f50654ec9bd6&languageId=51d9383e-1039-ed11-9db1-00224899347c') from origin 'https://XXXXXXXX' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Regards.

We have set the redirect URI in SPA but this is not solving the issue.

Upvotes: 0

Views: 37

Answers (0)

Related Questions