FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Problem between oauth2/authorize code and oauth2/token in android

    Scheduled Pinned Locked Moved Unsolved
    Q&A
    2
    2
    3.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      cgonzalez
      last edited by

      I have a weird problem in ionic app, in iOS is working without problem but in android the code is wrong.

      The only difference I notice is the locale in the two responses:

      iOS:
      https://[url]?code=[code]&locale=es_419&userState=Authenticated
      This code is working.

      Android
      https://[url]?code=[code]&locale=en_US&userState=Authenticated
      This code is not working

      I pass this code to oauth2/token in the same way, but in Android es responding:

      {"error":"invalid_request","error_description":"Invalid Authorization Code","error_reason":"auth_code_not_found"}
      

      I try to add locale in oauth2/authorize but the response is the same.

      joshuaJ 1 Reply Last reply Reply Quote 0
      • joshuaJ
        joshua @cgonzalez
        last edited by

        Hi @cgonzalez

        Can you confirm how quickly you are completing the exchange for a token using the code?

        "auth_code_not_found"
        

        The code may not be available if:

        1. It has expired or
        2. It as already been used to obtain a token.

        Thanks,
        Josh

        1 Reply Last reply Reply Quote 0
        • First post
          Last post