Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"MISSING_LOGIN_PARAMETERS" error : cookie issue? #206

Open
rodolphemarquant opened this issue Aug 30, 2023 · 0 comments
Open

"MISSING_LOGIN_PARAMETERS" error : cookie issue? #206

rodolphemarquant opened this issue Aug 30, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@rodolphemarquant
Copy link

rodolphemarquant commented Aug 30, 2023

Hi,

First, thank you for this great library!

I'm having trouble setting it up though (I'm also not a LTI expert...)

I currently have the following error when lauching my app through Moodle:
"{"status":400,"error":"Bad Request","details":{"message":"MISSING_LOGIN_PARAMETERS"}}"

Just had it after fixing a few issues with RSA keys and cookies. For the record, i have the following parameters:

    cookies: {
      secure: true, 
      sameSite: 'None' 
    },
    devMode: false 

The login URL and redirect URL are set up on Moodle (https://lti-test.fly.dev/login and https://lti-test.fly.dev respectively)

Console shows me a 400 error with a GET request at https://lti-test.fly.dev/login?response_type=id_token&response_mode=form_post&id_token_signed_response_alg=RS256&scope=openid&client_id=nvnr2QmJ0Re22C2&redirect_uri=https://lti-test.fly.dev&login_hint=74767&nonce=417n22t62t6gcw0yi89fbzmhz&prompt=none&state=3d6f37840c9acf4bc2633db31be6dd00d82664cd392e0edbaf&lti_message_hint=1393372&lti_deployment_id=112

It appears the error is caused by this line:
if (!params.iss || !params.login_hint || !params.target_link_uri)
When using console.log (and as we can see in the link above), param.iss and params.target_link_uri are indeed undefined.

Any idea what might be causing this?

Thank you!

Ltijs version

  • Version 5.6.5

NodeJS version

  • Version 16.15.0

Platform used

  • Moodle
@rodolphemarquant rodolphemarquant added the bug Something isn't working label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants