Skip to content

Cannot connect LtiLauncher to Surfconext OIDC #52

@torinfo

Description

@torinfo

If I connect LtiLaunche to surfconext, and ask surfconext to give me the name and email of the user, thet information never ends up in the actual LTI launch.

This is because LtiLauncher tries to get the name and email (and sub and picture) from the returned id_token. But the information by default is only available in the userinfo endpoint.

By adding a claims parameter to the authorize endpoint, th name and email are put in the id_token as well, aand everything works like it should. LtiLauncher uses a lot of scopes, but none of that information is used right now, so why not just ask for what is needed.

So the authorize call becomes like this:

uri.query = {
client_id: client_id,
redirect_uri: Rails.application.routes.url_helpers.launch_callback_url,
scope: 'openid',
claims: '{"id_token":{"name":null,"email":null}}',
response_type: 'code',
state: Keypair.jwt_encode(state_payload),
nonce: SecureRandom.uuid
}.to_query

on line 37 of app/models/auth_server.rb

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions