Exchange code for token CORS issue

We are building Authorization Code Flow with PKCE in Flutter. We do receive authorization code successfully.
We added our Flutter app host to trusted source in default authorization server. We do all requests manually as there is no SDK for Flutter.
Please, point us to the direction on how to fix this.

Are you currently attempting to redirect the user to the /authorize endpoint to get the authorization code?

Hi Andrea. This part is done
We are at step 6 now

Are you having an issue making the /token request? If so, are you encountering any specific errors?

Right, request is returning token successfully when done via Postman.
However, when making it from Flutter app we receive this CORS issue.

Here is sample request

Got same issue with /token endpoint in flutter

Do you find solution of the problem? I check doc about PCKE flow, and validate data. I don’t send client secret or smth like that, but still receive CORS for /token endpoint

Does the issue persist if you clear cache/cookies in the browser and retry? Are all users of this application affected or is it more environmental?

I try to clean cache and cookies and still face the issue with CORS. We just start implement OKTA SSO in Flutter with PKCE code and I start application local

Do you have any solution or could you advice some packages for Flutter (we use flutter for web application) integration with OKTA?

Find fix of issue. I reinstall flutter with flag that disable security. I event don’t know why this works like that

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.