
c6udb (c6udb) asked a question.
While hitting https://trial-8927900.okta.com/oauth2/default/v1/authorize its giving 400 error code. I am trying to create a client by following https://pub.dev/packages/oauth2 documentation. Any help would be appreciated.
Is there any flutter documentation that i can refer too or is there any alternative way to get access_token, i have tried with postman api but it gives invalid client_id error.

This is probably question better suited for the developer community (https://devforum.okta.com). That being said, I suggest you first take a look and make sure the value you have coded for "redirectUrl" in your code is set in Okta as a "Sign-in redirect URIs".
****oauth2 2.0.2 client library -- Authorization Code Grant ****
// This is a URL on your application's server. The authorization server
// will redirect the resource owner here once they've authorized the
// client. The redirection will include the authorization code in the
// query parameters.
final redirectUrl = Uri.parse('http://my-site.com/oauth2-redirect');
****OKTA OIDC WEB****
Set the "Sign-in redirect URIs" which is found under "Login" section on the "General" tab of your OIDC app in Okta.
example: Sign-in redirect URIs [http://my-site.com/oauth2-redirect]
"Okta sends the authentication response and ID token for the user's sign-in request to these URIs."