<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z0000ABtDOOCQ3Okta Classic EngineAuthenticationAnswered2025-08-03T09:01:30.000Z2024-06-27T06:48:33.000Z2024-06-28T20:45:59.000Z

c6udb (c6udb) asked a question.

Authorize endpoint giving 400 while integrating with flutter Oauth and Oauth_client package.

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.

Image is not available


  • MatthewH.10249 (State of Iowa)

    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."

    Expand Post
    Selected as Best
  • MatthewH.10249 (State of Iowa)

    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."

    Expand Post
    Selected as Best
This question is closed.
Loading
Authorize endpoint giving 400 while integrating with flutter Oauth and Oauth_client package.