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

Issue with JumpCloud #41

Open
yunylz opened this issue Dec 29, 2023 · 1 comment
Open

Issue with JumpCloud #41

yunylz opened this issue Dec 29, 2023 · 1 comment

Comments

@yunylz
Copy link

yunylz commented Dec 29, 2023

When setup with JumpCloud OIDC, after login this issue occurs:

Authentication failed

Cannot read properties of undefined (reading 'toLocaleLowerCase')

This is my conf:


module.exports = ({env}) => ({
    'strapi-plugin-sso': {
      enabled: true,
      config: {
        // OpenID Connect
        OIDC_REDIRECT_URI: 'https://stream-mgmt.danceparty.lol/strapi-plugin-sso/oidc/callback',
        OIDC_CLIENT_ID: ****',     
        OIDC_CLIENT_SECRET: '****',
        
        OIDC_SCOPES: 'openid profile email', // https://oauth.net/2/scope/
        // API Endpoints required for OIDC
        OIDC_AUTHORIZATION_ENDPOINT: 'https://oauth.id.jumpcloud.com/oauth2/auth', 
        OIDC_TOKEN_ENDPOINT: 'https://oauth.id.jumpcloud.com/oauth2/token',
        OIDC_USER_INFO_ENDPOINT: 'https://oauth.id.jumpcloud.com/userinfo',
        OIDC_USER_INFO_ENDPOINT_WITH_AUTH_HEADER: false,
        OIDC_GRANT_TYPE: 'authorization_code', // https://oauth.net/2/grant-types/
        // customizable username arguments
        OIDC_FAMILY_NAME_FIELD: 'family_name',
        OIDC_GIVEN_NAME_FIELD: 'given_name',
      }
    }
  })

And result from PM2:

5|stream-m | [2023-12-29 14:57:28.634] http: GET /strapi-plugin-sso/oidc (2 ms) 302
5|stream-m | [2023-12-29 14:57:32.435] http: GET /strapi-plugin-sso/oidc/callback?code=kIJmVyZxt5x3gXHNeaqaSN************&scope=openid+profile+email&state=undefined (943 ms) 200
Screenshot 2023-12-29 16 59 09
@yasudacloud
Copy link
Owner

@chaeyan
Sorry for the delay.
There is probably an error in converting your email address to lower case.
In other words, I expect that the response after authentication does not include the email. Is it possible to add the email in the provider's settings?

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

No branches or pull requests

2 participants