Skip to content

Conversation

basmasking
Copy link
Member

@basmasking basmasking commented Feb 7, 2025

Fixes #364
Closes #379

Changes proposed in this pull request:

  • The openid-client has changed the way their api works, so a rewrite of our implementation was necessary.
  • Added additional configuration to allow insecure requests for local development

@MaskingTechnology/comify

@basmasking basmasking linked an issue Feb 7, 2025 that may be closed by this pull request
Comment on lines 30 to 31
readonly #configuration: OpenIDConfiguration;
#config?: Configuration;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both names might be clear on their own, but combined their quite confusing...

Suggested change
readonly #configuration: OpenIDConfiguration;
#config?: Configuration;
readonly #providerConfiguration: OpenIDConfiguration;
#clientConfiguration?: Configuration;


const tokenSet = await client.callback(redirectUri, data);
const userinfo = await client.userinfo(tokenSet.access_token as string);
const sub = claims!.sub as string;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the docs, the claims can be undefined when the auth server doesn't return a expires_in value. Shouldn't we check this?

Copy link

sonarqubecloud bot commented Feb 7, 2025

@petermasking petermasking merged commit 64468c0 into main Feb 7, 2025
6 checks passed
@petermasking petermasking deleted the 364-upgrade-openid-client-implementation branch February 7, 2025 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade openid client implementation
2 participants