Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

SIGNIN_OAUTH_ERROR on google provider #6088

Closed
tcetin opened this issue Dec 16, 2022 · 0 comments
Closed

SIGNIN_OAUTH_ERROR on google provider #6088

tcetin opened this issue Dec 16, 2022 · 0 comments
Labels
question Ask how to do something or how something works

Comments

@tcetin
Copy link

tcetin commented Dec 16, 2022

Question 💬

Hi,

I am getting this error when I try to log in with google social provider.

TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received an instance of Object.

It works fine if I don't visit any other page except the home page (http://localhost:3000). But if I visit any other page after signing in except the home page, then I sign out on any page after that; when I try to sign in, it throws this error.

Here are my google login provider settings:

GoogleProvider({
  clientId: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID,
  clientSecret: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_SECRET,
  authorization: {
    params: {
      prompt: 'consent',
      access_type: 'offline',
      response_type: 'code',
    },
  },
}),

I also use NEXTAUTH_SECRET in the next auth configuration:

secret: process.env.NEXTAUTH_SECRET

How to reproduce ☕️

  1. Login with google provider
  2. Visit another page and then sign out
  3. Try to log in again by google provider

Contributing 🙌🏽

Yes, I am willing to help answer this question in a PR

@tcetin tcetin added the question Ask how to do something or how something works label Dec 16, 2022
@nextauthjs nextauthjs locked and limited conversation to collaborators Dec 16, 2022
@balazsorban44 balazsorban44 converted this issue into discussion #6090 Dec 16, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
question Ask how to do something or how something works
Projects
None yet
Development

No branches or pull requests

1 participant