
PaulT.65384 (Customer) asked a question.
I'm trying to implement OIDC authetication in a React app using the @okta/okta-react (5.1.1) and @okta/okta-auth-js (4.9.0) npm packages. Within my development account, I've created an SPA client application, associating it with one of my user accounts, and I've also created an authorization server that will be used to authorize the API calls that the React app will make to its backend service. I've established that the backend service calls are already authorized successfully using Postman.
I've wrapped my React app with the `Security` component, and I've configured the OktaAuth client as follows:
```javascript
const oktaAuth = new OktaAuth({
issuer: process.env.REACT_APP_IDP_URL,
clientId: process.env.REACT_APP_IDP_CLIENTID,
redirectUri: window.location.origin + "/login/callback",
scopes: ['svc.document-generator', 'openid', 'profile', 'email','address','phone','offline_access'],
pkce: true,
disableHttpsCheck: true,
});
```
Note that the value of the `issuer` property is set to the URL of the authorizer I created for the backend service, not the default authorizer. My custom authorizer includes the svc.document-generator scope, and has an access policy that grants access to all clients and users.
When I try to access one of the secure routes in the app, I get redirected to the Okta login page successfully, and I can log in with the user account that's assigned to the SPA application. However, when Okta tries to redirect to the login callback, I get the following error:
```
OAuthError: Policy evaluation failed for this request, please check the policy configurations.
```
Can anyone suggest what I'm doing wrong and/or what I can do to get this working?

Daniel here, with Okta support.
Please check if you have an Access Policy and Rule, https://developer.okta.com/docs/guides/customize-authz-server/create-access-policies/, exist for the Authorization Server you are using as the issuer for your application?
If that doesn't solve your issue, please open a ticket with the developer team.