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

Sign In with LinkedIn is deprecated, use Sign In with LinkedIn using OpenID Connect instead #8316

Closed
setren opened this issue Aug 14, 2023 · 21 comments · Fixed by #8345 or #8396
Closed
Labels
providers triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@setren
Copy link

setren commented Aug 14, 2023

Provider type

LinkedIn

Environment

System:
OS: macOS 13.4.1
CPU: (8) arm64 Apple M1
Memory: 82.78 MB / 8.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.17.0/bin/yarn
npm: 9.6.5 - ~/.nvm/versions/node/v16.17.0/bin/npm
pnpm: 7.5.2 - ~/.nvm/versions/node/v16.17.0/bin/pnpm
Browsers:
Chrome: 115.0.5790.170
Safari: 16.5.2

Reproduction URL

https://github.com/setren/linkedin-provider

Describe the issue

Linkedin changed its authentication method from Sign in with LinkedIn to Sign in with LinkedIn using OpenID Connect, since then the new app registered recently had this error

https://next-auth.js.org/errors#oauth_callback_handler_error unauthorized_scope_error {
error: {
message: 'unauthorized_scope_error',
stack: 'Error: unauthorized_scope_error\n' +
' at oAuthCallback (webpack-internal:///(api)/./node_modules/next-auth/core/lib/oauth/callback.js:39:19)\n' +
' at Object.callback (webpack-internal:///(api)/./node_modules/next-auth/core/routes/callback.js:52:39)\n' +
' at AuthHandler (webpack-internal:///(api)/./node_modules/next-auth/core/index.js:208:41)\n' +
' at processTicksAndRejections (node:internal/process/task_queues:96:5)\n' +
' at async NextAuthApiHandler (webpack-internal:///(api)/./node_modules/next-auth/next/index.js:22:19)\n' +
' at async NextAuth._args$ (webpack-internal:///(api)/./node_modules/next-auth/next/index.js:107:14)',
name: 'Error'
},
error_description: 'Scope "r_liteprofile" is not authorized for your application',
providerId: 'linkedin',
message: 'unauthorized_scope_error'
}

It seems that scope variable changed from "r_liteprofile r_emailaddress" to "profile email" https://learn.microsoft.com/en-us/linkedin/shared/authentication/getting-access#open-permissions-consumer. I have tried to add scope manually LinkedinProvider({ clientId: process.env.LINKEDIN_CLIENT_ID!, clientSecret: process.env.LINKEDIN_CLIENT_SECRET!, authorization: { params: { scope: "profile email", }, }, }), but it gives this error

[next-auth][error][OAUTH_CALLBACK_ERROR]
https://next-auth.js.org/errors#oauth_callback_error expected 200 OK, got: 403 Forbidden {
error: OPError: expected 200 OK, got: 403 Forbidden
at processResponse (/Users/setren/Documents/linkedin-auth/node_modules/openid-client/lib/helpers/process_response.js:41:11)
at Client.userinfo (/Users/setren/Documents/linkedin-auth/node_modules/openid-client/lib/client.js:1237:18)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async oAuthCallback (webpack-internal:///(api)/./node_modules/next-auth/core/lib/oauth/callback.js:131:17)
at async Object.callback (webpack-internal:///(api)/./node_modules/next-auth/core/routes/callback.js:52:11)
at async AuthHandler (webpack-internal:///(api)/./node_modules/next-auth/core/index.js:208:28)
at async NextAuthApiHandler (webpack-internal:///(api)/./node_modules/next-auth/next/index.js:22:19)
at async NextAuth._args$ (webpack-internal:///(api)/./node_modules/next-auth/next/index.js:107:14) {
name: 'OAuthCallbackError',
code: undefined
},
providerId: 'linkedin',
message: 'expected 200 OK, got: 403 Forbidden'
}

Similar problem using firebase https://stackoverflow.com/questions/76890650/sign-in-with-linkedin-using-openid-connect-with-firebase-auth-or-gcp-identity-pl

How to reproduce

-Clone this repo https://github.com/nextauthjs/next-auth-example
-Add linkedin provider

Expected behavior

The user is available to sign in.

@setren setren added providers triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Aug 14, 2023
@nguaman
Copy link

nguaman commented Aug 16, 2023

Just to add more information,
This is what the console outputs when adding debug: true.

[next-auth][warn][DEBUG_ENABLED] 
https://next-auth.js.org/warnings#debug_enabled
[next-auth][debug][CREATE_STATE] { value: 'zTntEv1xrktX7_mnbt_18Wusy1BFKmzHDwrASa0xJVY', maxAge: 900 }
[next-auth][debug][GET_AUTHORIZATION_URL] {
  url: 'https://www.linkedin.com/oauth/v2/authorization?client_id=xxxx&scope=profile&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fapi%2Fauth%2Fcallback%2Flinkedin&state=zTntEv1xrktX7_mnbt_18Wusy1BFKmzHDwrASa0xJVY',
  cookies: [
    {
      name: 'next-auth.state',
      value: 'eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..YtKVBUGl21AqROE4._uCuPYfPf9yxGTwFRePGo-3rkyoaqzJ4-WYPaia1_3zPmgmtC98fuQVLHuey0QeSJ_GaH5106BCrpPB9qAm18JX0qXtY07xL5xeGf_r_NS1IyZFPZ6sQ00xL27T8j_imtHEwQZmfP4eKADZDyIMFHwXIDTywXW5AXXMXEdvX7APFihdjt20.HYdhnTIOuY9KWBVbcMz9UQ',
      options: [Object]
    }
  ],
  provider: {
    id: 'linkedin',
    name: 'LinkedIn',
    type: 'oauth',
    authorization: {
      url: 'https://www.linkedin.com/oauth/v2/authorization',
      params: [Object]
    },
    token: {
      url: 'https://www.linkedin.com/oauth/v2/accessToken',
      params: {}
    },
    client: { token_endpoint_auth_method: 'client_secret_post' },
    userinfo: { url: 'https://api.linkedin.com/v2/me', params: [Object] },
    profile: [AsyncFunction: profile],
    style: {
      logo: '/linkedin.svg',
      logoDark: '/linkedin-dark.svg',
      bg: '#fff',
      text: '#069',
      bgDark: '#069',
      textDark: '#fff'
    },
    idToken: false,
    checks: [ 'state' ],
    clientId: 'xxxx',
    clientSecret: 'xxxx',
    signinUrl: 'http://localhost:3000/api/auth/signin/linkedin',
    callbackUrl: 'http://localhost:3000/api/auth/callback/linkedin'
  }
}
[next-auth][error][OAUTH_CALLBACK_ERROR] 
https://next-auth.js.org/errors#oauth_callback_error expected 200 OK, got: 403 Forbidden {
  error: OPError: expected 200 OK, got: 403 Forbidden
      at processResponse (webpack-internal:///(rsc)/./node_modules/openid-client/lib/helpers/process_response.js:37:15)
      at Client.userinfo (webpack-internal:///(rsc)/./node_modules/openid-client/lib/client.js:1110:22)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async oAuthCallback (webpack-internal:///(rsc)/./node_modules/next-auth/core/lib/oauth/callback.js:136:23)
      at async Object.callback (webpack-internal:///(rsc)/./node_modules/next-auth/core/routes/callback.js:18:79)
      at async AuthHandler (webpack-internal:///(rsc)/./node_modules/next-auth/core/index.js:202:38)
      at async NextAuthRouteHandler (webpack-internal:///(rsc)/./node_modules/next-auth/next/index.js:50:30)
      at async NextAuth._args$ (webpack-internal:///(rsc)/./node_modules/next-auth/next/index.js:84:24)
      at async eval (webpack-internal:///(rsc)/./node_modules/next/dist/server/future/route-modules/app-route/module.js:254:37) {
    name: 'OAuthCallbackError',
    code: undefined
  },
  providerId: 'linkedin',
  message: 'expected 200 OK, got: 403 Forbidden'
}

Currently, the scopes have these names:

image

But previously, they had these names:

image

The Auth0 team has a quite similar issue.

@yanachepyk
Copy link

Hi,

Getting same OAuthCallback error: http://localhost:3000/api/auth/signin?error=OAuthCallback.
Even after adding a scope (same as in my app on linkedIn) get same error:

LinkedInProvider({
      clientId: process.env.LINKEDIN_CLIENT_ID as string,
      clientSecret: <string>process.env.LINKEDIN_CLIENT_SECRET,
      authorization: {
        params: {
          scope: "openid profile email",
        }
      },
    })

After adding wellKnown: 'https://www.linkedin.com/oauth/.well-known/openid-configuration' to LinkedInProvider settings,
the issue is gone, but now nothing happening on singIn.
I get 200 OK for signIn, redirected to /signin page, but user info is not received as well as session.

Does anybody have suggestions?

More info:

const authOptions: NextAuthOptions = {
  providers: [
    GoogleProvider({
      clientId: <string>process.env.GOOGLE_CLIENT_ID,
      clientSecret: <string>process.env.GOOGLE_CLIENT_SECRET,
    }),
    LinkedInProvider({
      clientId: process.env.LINKEDIN_CLIENT_ID as string,
      clientSecret: <string>process.env.LINKEDIN_CLIENT_SECRET,
      wellKnown: 'https://www.linkedin.com/oauth/.well-known/openid-configuration',
      authorization: {
        params: {
          scope: "openid profile email",
        }
      },
    }),
    ...
  ],
  secret: process.env.JWT_SECRET
};

export default NextAuth(authOptions);

image

@HugeLetters
Copy link
Contributor

Hey, guys, had the same issue, I was able to fix this locally - I'll link a PR soon.

@yanachepyk user info is not retrieved cause the way next-auth handles profile response for linked-in is outdated.

@tranminhquanq
Copy link
Contributor

tranminhquanq commented Aug 23, 2023

Hi @setren, you just to add more information

LinkedInProvider({
      clientId: process.env.LINKEDIN_CLIENT_ID,
      clientSecret: process.env.LINKEDIN_CLIENT_SECRET,
      authorization: {
        params: { scope: 'openid profile email' },
      },
      issuer: 'https://www.linkedin.com',
      jwks_endpoint: 'https://www.linkedin.com/oauth/openid/jwks',
      profile(profile, tokens) {
        const defaultImage =
          'https://cdn-icons-png.flaticon.com/512/174/174857.png';
        return {
          id: profile.sub,
          name: profile.name,
          email: profile.email,
          image: profile.picture ?? defaultImage,
        };
      },
   })

Currently, the scopes have these names:

Screen Shot 2023-08-24 at 00 14 06

@setren
Copy link
Author

setren commented Aug 23, 2023

That works, cool 🙌

@tranminhquanq
Copy link
Contributor

tranminhquanq commented Aug 23, 2023

@setren Ok bro, i have created a pull request #8396

@joemulberry
Copy link

joemulberry commented Aug 29, 2023

Hi @setren, you just to add more information

LinkedInProvider({
      clientId: process.env.LINKEDIN_CLIENT_ID,
      clientSecret: process.env.LINKEDIN_CLIENT_SECRET,
      authorization: {
        params: { scope: 'openid profile email' },
      },
      issuer: 'https://www.linkedin.com',
      jwks_endpoint: 'https://www.linkedin.com/oauth/openid/jwks',
      profile(profile, tokens) {
        const defaultImage =
          'https://cdn-icons-png.flaticon.com/512/174/174857.png';
        return {
          id: profile.sub,
          name: profile.name,
          email: profile.email,
          image: profile.picture ?? defaultImage,
        };
      },
   })

Currently, the scopes have these names:

Screen Shot 2023-08-24 at 00 14 06

@tranminhwang I am able to return the access_token from this?

adding

accessToken: tokens.access_token,
to the return does not seem to work, even though console.log(tokens.access_token) does

@tranminhquanq
Copy link
Contributor

tranminhquanq commented Aug 29, 2023

@tranminhwang I am able to return the access_token from this?

@joemulberry No, you have to add a JWT callback

 jwt({ token, account }) {
      if (account) {
        token.access_token = account.access_token;
      }
    return token;
},

read more here: https://next-auth.js.org/configuration/callbacks

@Rahularya01
Copy link

Hi @setren, you just to add more information

LinkedInProvider({
      clientId: process.env.LINKEDIN_CLIENT_ID,
      clientSecret: process.env.LINKEDIN_CLIENT_SECRET,
      authorization: {
        params: { scope: 'openid profile email' },
      },
      issuer: 'https://www.linkedin.com',
      jwks_endpoint: 'https://www.linkedin.com/oauth/openid/jwks',
      profile(profile, tokens) {
        const defaultImage =
          'https://cdn-icons-png.flaticon.com/512/174/174857.png';
        return {
          id: profile.sub,
          name: profile.name,
          email: profile.email,
          image: profile.picture ?? defaultImage,
        };
      },
   })

Currently, the scopes have these names:

Screen Shot 2023-08-24 at 00 14 06

Thanks

@mehul1011
Copy link

mehul1011 commented Oct 8, 2023

Correct me at any point if i am wrong,
Is there a way to get more details of LinkedIn users' profiles, for example, their current working place/company, and also their unique usernames?

Login with LinkedIn might not be use full (for getting users' details), this might as well be the same as logging in with google because these details are not impactful considering LinkedIn keeps so much more which it exposed in their previous API which is now deprecated.
They have also restricted most of the valuable API endpoints to approved developers.

@goerlitz
Copy link
Contributor

goerlitz commented Oct 22, 2023

Unfortunately, this is still an issue that several people run into (including me). See #8831

What's the issue?

  • the LinkedIn provider documentation has not been updated. It still refers to the deprecated OAuth API (https://next-auth.js.org/providers/linkedin)
  • import LinkedIn from 'next-auth/providers/linkedin' in the latest next-auth package (4.24.3) imports the deprecated LinkedIn provider and there is now new OIDC version available.
  • the new core/providers/linkedin implementation cannot be imported in latest next-auth package.

Any info when this will be fixed is highly appreciated (I could actually help). I would also suggest to reopen this issue until it is fixed.

@Gyanihulk
Copy link

@goerlitz I agree the issue is still there
"next-auth": "^4.24.5",

image

I feel these scopes are deprecated

@vivekkumar995
Copy link

2024-01-09T12:39:45.140+05:30�[0;39m �[31mERROR�[0;39m �[35m34948�[0;39m �[2m---�[0;39m �[2m[nio-8080-exec-5]�[0;39m �[2m�[0;39m�[36mc.t.S.I.p.securities.WebSecurityConfig �[0;39m �[2m:�[0;39m Authentication failure: [invalid_nonce]
�[2m2024-01-09T12:39:45.140+05:30�[0;39m �[31mERROR�[0;39m �[35m34948�[0;39m �[2m---�[0;39m �[2m[nio-8080-exec-5]�[0;39m �[2m�[0;39m�[36mc.t.S.I.p.securities.WebSecurityConfig �[0;39m �[2m:�[0;39m Authorization Request: org.apache.catalina.util.ParameterMap@24687b25 getting this error

@tonilopezmr
Copy link

Issue is still there with latest version and default configuration.

1 similar comment
@paramaggarwal
Copy link
Contributor

Issue is still there with latest version and default configuration.

@abdarker
Copy link

Hi @setren, you just to add more information

LinkedInProvider({
      clientId: process.env.LINKEDIN_CLIENT_ID,
      clientSecret: process.env.LINKEDIN_CLIENT_SECRET,
      authorization: {
        params: { scope: 'openid profile email' },
      },
      issuer: 'https://www.linkedin.com',
      jwks_endpoint: 'https://www.linkedin.com/oauth/openid/jwks',
      profile(profile, tokens) {
        const defaultImage =
          'https://cdn-icons-png.flaticon.com/512/174/174857.png';
        return {
          id: profile.sub,
          name: profile.name,
          email: profile.email,
          image: profile.picture ?? defaultImage,
        };
      },
   })

Currently, the scopes have these names:

Screen Shot 2023-08-24 at 00 14 06

image

i am getting this error. other than this i am getting user info and accesstokens everything successfully. whenever i check status from useSession i am getting 'unauthenticated' status. here's my implementation

LinkedInProvider({
     clientId: process.env.LINKEDIN_CLIENT_ID as string,
     clientSecret: process.env.LINKEDIN_CLIENT_SECRET as string,
     wellKnown:
       "https://www.linkedin.com/oauth/.well-known/openid-configuration",

     authorization: {
       params: { scope: "openid profile email" },
     },
     issuer: "https://www.linkedin.com",
     jwks_endpoint: "https://www.linkedin.com/oauth/openid/jwks",
     profile(profile, tokens) {
       return {
         id: profile.sub,
         ...profile,
         ...tokens,
       };
     },
   }),

linkedin scope
image

@holgerflick
Copy link

Sadly, this approach no longer works. Still getting an error.

[auth][error] OperationProcessingError: "response" is not a conform Authorization Server Metadata response
    at Module.processDiscoveryResponse (webpack-internal:///(rsc)/./node_modules/oauth4webapi/build/index.js:287:15)
    at getAuthorizationUrl (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/actions/signin/authorization-url.js:25:68)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Module.signIn (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/actions/signin/index.js:16:56)
    at async AuthInternal (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/index.js:72:24)
    at async Auth (webpack-internal:///(rsc)/./node_modules/@auth/core/index.js:126:34)
    at async /Users/holger/web/next.providers/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:53446
    at async e_.execute (/Users/holger/web/next.providers/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:44747)
    at async e_.handle (/Users/holger/web/next.providers/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:54700)
    at async doRender (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1377:42)
    at async cacheEntry.responseCache.get.routeKind (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1587:40)
    at async DevServer.renderToResponseWithComponentsImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1507:28)
    at async DevServer.renderPageComponent (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1924:24)
    at async DevServer.renderToResponseImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1962:32)
    at async DevServer.pipeImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:920:25)
    at async NextNodeServer.handleCatchallRenderRequest (/Users/holger/web/next.providers/node_modules/next/dist/server/next-server.js:272:17)
    at async DevServer.handleRequestImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:816:17)
    at async /Users/holger/web/next.providers/node_modules/next/dist/server/dev/next-dev-server.js:339:20
    at async Span.traceAsyncFn (/Users/holger/web/next.providers/node_modules/next/dist/trace/trace.js:154:20)
    at async DevServer.handleRequest (/Users/holger/web/next.providers/node_modules/next/dist/server/dev/next-dev-server.js:336:24)
    at async invokeRender (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/router-server.js:174:21)
    at async handleRequest (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/router-server.js:353:24)
    at async requestHandlerImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/router-server.js:377:13)
    at async Server.requestListener (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/start-server.js:141:13)
 POST /api/auth/signin/linkedin 302 in 172ms
 GET /api/auth/error?error=Configuration 500 in 5ms

@Jonathan-Dobson
Copy link

Jonathan-Dobson commented May 26, 2024

Sadly, this approach no longer works. Still getting an error.

[auth][error] OperationProcessingError: "response" is not a conform Authorization Server Metadata response
    at Module.processDiscoveryResponse (webpack-internal:///(rsc)/./node_modules/oauth4webapi/build/index.js:287:15)
    at getAuthorizationUrl (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/actions/signin/authorization-url.js:25:68)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Module.signIn (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/actions/signin/index.js:16:56)
    at async AuthInternal (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/index.js:72:24)
    at async Auth (webpack-internal:///(rsc)/./node_modules/@auth/core/index.js:126:34)
    at async /Users/holger/web/next.providers/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:53446
    at async e_.execute (/Users/holger/web/next.providers/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:44747)
    at async e_.handle (/Users/holger/web/next.providers/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:54700)
    at async doRender (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1377:42)
    at async cacheEntry.responseCache.get.routeKind (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1587:40)
    at async DevServer.renderToResponseWithComponentsImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1507:28)
    at async DevServer.renderPageComponent (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1924:24)
    at async DevServer.renderToResponseImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1962:32)
    at async DevServer.pipeImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:920:25)
    at async NextNodeServer.handleCatchallRenderRequest (/Users/holger/web/next.providers/node_modules/next/dist/server/next-server.js:272:17)
    at async DevServer.handleRequestImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:816:17)
    at async /Users/holger/web/next.providers/node_modules/next/dist/server/dev/next-dev-server.js:339:20
    at async Span.traceAsyncFn (/Users/holger/web/next.providers/node_modules/next/dist/trace/trace.js:154:20)
    at async DevServer.handleRequest (/Users/holger/web/next.providers/node_modules/next/dist/server/dev/next-dev-server.js:336:24)
    at async invokeRender (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/router-server.js:174:21)
    at async handleRequest (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/router-server.js:353:24)
    at async requestHandlerImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/router-server.js:377:13)
    at async Server.requestListener (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/start-server.js:141:13)
 POST /api/auth/signin/linkedin 302 in 172ms
 GET /api/auth/error?error=Configuration 500 in 5ms

I'm getting this error also. Did you find a solution?

@abdarker
Copy link

abdarker commented Jun 5, 2024

Sadly, this approach no longer works. Still getting an error.

[auth][error] OperationProcessingError: "response" is not a conform Authorization Server Metadata response
    at Module.processDiscoveryResponse (webpack-internal:///(rsc)/./node_modules/oauth4webapi/build/index.js:287:15)
    at getAuthorizationUrl (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/actions/signin/authorization-url.js:25:68)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Module.signIn (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/actions/signin/index.js:16:56)
    at async AuthInternal (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/index.js:72:24)
    at async Auth (webpack-internal:///(rsc)/./node_modules/@auth/core/index.js:126:34)
    at async /Users/holger/web/next.providers/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:53446
    at async e_.execute (/Users/holger/web/next.providers/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:44747)
    at async e_.handle (/Users/holger/web/next.providers/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:54700)
    at async doRender (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1377:42)
    at async cacheEntry.responseCache.get.routeKind (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1587:40)
    at async DevServer.renderToResponseWithComponentsImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1507:28)
    at async DevServer.renderPageComponent (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1924:24)
    at async DevServer.renderToResponseImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1962:32)
    at async DevServer.pipeImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:920:25)
    at async NextNodeServer.handleCatchallRenderRequest (/Users/holger/web/next.providers/node_modules/next/dist/server/next-server.js:272:17)
    at async DevServer.handleRequestImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:816:17)
    at async /Users/holger/web/next.providers/node_modules/next/dist/server/dev/next-dev-server.js:339:20
    at async Span.traceAsyncFn (/Users/holger/web/next.providers/node_modules/next/dist/trace/trace.js:154:20)
    at async DevServer.handleRequest (/Users/holger/web/next.providers/node_modules/next/dist/server/dev/next-dev-server.js:336:24)
    at async invokeRender (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/router-server.js:174:21)
    at async handleRequest (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/router-server.js:353:24)
    at async requestHandlerImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/router-server.js:377:13)
    at async Server.requestListener (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/start-server.js:141:13)
 POST /api/auth/signin/linkedin 302 in 172ms
 GET /api/auth/error?error=Configuration 500 in 5ms

Sadly, this approach no longer works. Still getting an error.

[auth][error] OperationProcessingError: "response" is not a conform Authorization Server Metadata response
    at Module.processDiscoveryResponse (webpack-internal:///(rsc)/./node_modules/oauth4webapi/build/index.js:287:15)
    at getAuthorizationUrl (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/actions/signin/authorization-url.js:25:68)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Module.signIn (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/actions/signin/index.js:16:56)
    at async AuthInternal (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/index.js:72:24)
    at async Auth (webpack-internal:///(rsc)/./node_modules/@auth/core/index.js:126:34)
    at async /Users/holger/web/next.providers/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:53446
    at async e_.execute (/Users/holger/web/next.providers/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:44747)
    at async e_.handle (/Users/holger/web/next.providers/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:54700)
    at async doRender (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1377:42)
    at async cacheEntry.responseCache.get.routeKind (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1587:40)
    at async DevServer.renderToResponseWithComponentsImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1507:28)
    at async DevServer.renderPageComponent (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1924:24)
    at async DevServer.renderToResponseImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:1962:32)
    at async DevServer.pipeImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:920:25)
    at async NextNodeServer.handleCatchallRenderRequest (/Users/holger/web/next.providers/node_modules/next/dist/server/next-server.js:272:17)
    at async DevServer.handleRequestImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/base-server.js:816:17)
    at async /Users/holger/web/next.providers/node_modules/next/dist/server/dev/next-dev-server.js:339:20
    at async Span.traceAsyncFn (/Users/holger/web/next.providers/node_modules/next/dist/trace/trace.js:154:20)
    at async DevServer.handleRequest (/Users/holger/web/next.providers/node_modules/next/dist/server/dev/next-dev-server.js:336:24)
    at async invokeRender (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/router-server.js:174:21)
    at async handleRequest (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/router-server.js:353:24)
    at async requestHandlerImpl (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/router-server.js:377:13)
    at async Server.requestListener (/Users/holger/web/next.providers/node_modules/next/dist/server/lib/start-server.js:141:13)
 POST /api/auth/signin/linkedin 302 in 172ms
 GET /api/auth/error?error=Configuration 500 in 5ms

I'm getting this error also. Did you find a solution?

do you guys still need help? i have successfully integrated LinkedIn login in next auth

@Pixel-Panda
Copy link

It’s actually oidc not openid. That’s a scope

@abdarker
Copy link

abdarker commented Oct 2, 2024

It’s actually oidc not openid. That’s a scope

well whatever it is. i fixed it back then and it's in production now servicing as a country's best recruit management service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
providers triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Projects
None yet