GithubHelp home page GithubHelp logo

400 error while signIn about edx-app-ios HOT 7 CLOSED

openedx avatar openedx commented on June 6, 2024
400 error while signIn

from edx-app-ios.

Comments (7)

aleffert avatar aleffert commented on June 6, 2024

@krishnakanthjb have you enabled oauth support on your edx instance?

from edx-app-ios.

krishnakanthjb avatar krishnakanthjb commented on June 6, 2024

I got ClientID and Client secret....BTW where to enable that..In the edx-master?

from edx-app-ios.

aleffert avatar aleffert commented on June 6, 2024

@krishnakanthjb See the instructions here http://edx-installing-configuring-and-running.readthedocs.org/en/latest/mobile.html in particular section 10.2.1 which will give you the server side configuration keys you need to set.

from edx-app-ios.

krishnakanthjb avatar krishnakanthjb commented on June 6, 2024

@aleffert : As suggested, We've cross checked and also enabled the following

"FEATURES" : {
...
"ENABLE_MOBILE_REST_API": true,
"ENABLE_OAUTH2_PROVIDER": true,
"ENABLE_COMBINED_LOGIN_REGISTRATION": true
}

in the edx/app/edxapp/lms.env.json. we are still getting the 400 error code.

Xcode Response :

<NSHTTPURLResponse: 0x7fa37b75aef0> { URL: /oauth2/access_token } { status code: 400, headers {
"Cache-Control" = "no-store";
Connection = "keep-alive";
"Content-Language" = en;
"Content-Type" = "application/json";
Date = "Wed, 02 Sep 2015 13:26:33 GMT";
Pragma = "no-cache";
Server = "nginx/1.1.19";
"Set-Cookie" = "sessionid=ab9dbf025e7c4b5799978444127ac138; expires=Wed, 16-Sep-2015 13:26:33 GMT; httponly; Max-Age=1209600; Path=/";
"Transfer-Encoding" = Identity;
Vary = "Accept-Language, Cookie";
"X-Frame-Options" = ALLOW;
} }
Also when we are trying from the firefox REST client tool, it showing the below response.
I'm passing this as body:

{"client-id":"xxxxxxxxxxxxxx",
"username":"[email protected]",
"password":"xxxxxxxx",
"grant-type":"password"}

Response:
Status Code: 400 BAD REQUEST
Cache-Control: no-store
Connection: keep-alive
Content-Language: en
Content-Type: application/json
Date: Wed, 02 Sep 2015 14:26:35 GMT
Pragma: no-cache
Server: nginx/1.1.19
Transfer-Encoding: chunked
Vary: Accept-Language, Cookie
X-Frame-Options: ALLOW
{"error_description": "A secure connection is required.", "error": "invalid_request"}

Seems like this is breaking, pls confirm:
URL: /oauth2/access_token
Please suggest what going wrong, we've configured the setting's as per the ReadMe Notes.

from edx-app-ios.

aleffert avatar aleffert commented on June 6, 2024

@krishnakanthjb You probably need to disable the SSL requirement by setting OAUTH_ENFORCE_SECURE in your server config to false. Alternately, you can enable SSL on your server, which is recommended for a production configuration.

from edx-app-ios.

krishnakanthjb avatar krishnakanthjb commented on June 6, 2024

@aleffert Thanks...Will check and let you know the update..

from edx-app-ios.

phyominthu avatar phyominthu commented on June 6, 2024

@krishnakanthjb Was the issue fixed for you? What did you change to make it work? I'm having the same problem right now.

from edx-app-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.