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

OIDC stubbing #5

Merged
merged 6 commits into from
Nov 29, 2023
Merged

OIDC stubbing #5

merged 6 commits into from
Nov 29, 2023

Conversation

christopherjturner
Copy link
Contributor

No description provided.


// copy over the refresh token if its not there
// unsure if we still need the !== string 'null' check anymore
if (refreshToken && refreshToken !== 'null') {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if that's actually needed cause you handle the refresh token further down?

tokenResponse.access_token = generateToken(request.keys, session)

// the example only checked the first item in the scope, unsure if this is correct or an oversight?
if (session.scopes[0] === 'openid') {
Copy link
Contributor

Choose a reason for hiding this comment

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

That's correct. Similarly, you only generate a refresh token if scope offline is passed.


if (grantType !== 'refresh_token') {
logger.info('generating a refresh token')
tokenResponse.refresh_token = generateRefreshToken(request.keys, session)
Copy link
Contributor

Choose a reason for hiding this comment

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

Check my comment above on offline scope

@argyakrivos
Copy link
Contributor

Very very nice, looking good 😎

@christopherjturner christopherjturner merged commit 311e544 into main Nov 29, 2023
1 check passed
@christopherjturner christopherjturner deleted the oidc-stubbing branch November 29, 2023 11:00
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.

2 participants