Prasanga Thapaliya
Prasanga Thapaliya

Reputation: 737

Clerk authentication redirecting to /sign-in/sso-callback after signing in with google in next15

I have a fresh next15 application and have used Clerk for an authentication and enabled google sign in, in the clerk dashboard.

import { SignedIn, SignedOut, UserButton } from "@clerk/nextjs";
import Link from "next/link";
import {FaSearch} from "react-icons/fa"

export default function Header() {
  return (
    <header className="bg-slate-200 shadow-md">
      <div className="flex justify-between items-center max-w-6xl mx-auto p-3">
        <Link href="/">
          <h1 className="font-bold text-sm sm:text-xl flex flex-wrap">
            <span className="text-slate-500">Real</span>
            <span className="text-slate-700">Estate</span>
          </h1>
        </Link>
        <form className="bg-slate-100 p-3 rounded-lg flex items-center">
          <input 
            type="text"
            placeholder="Search..."
            className="bg-transparent focus:outline-none w-24 sm:w-64"
          />
          <button>
            <FaSearch className="text-slate-600" />
          </button>
        </form>
        <ul className='flex gap-4'>
          <Link href='/'>
            <li className='hidden md:inline text-slate-700 hover:underline'>
              Home
            </li>
          </Link>
          <Link href='/about'>
            <li className='hidden md:inline text-slate-700 hover:underline'>
              About
            </li>
          </Link>
          <SignedIn>
            <UserButton />
          </SignedIn>
          <SignedOut>
            <Link href='/sign-in'>
              <li className='hidden md:inline text-slate-700 hover:underline'>
                Sign In
              </li>
            </Link>
          </SignedOut>
        </ul>
      </div>
    </header>
  )
}

After deploying to vercel, When I log in with google from laptop which I am working, it redirects to /sign-in/sso-callback and says "The External Account was not found." But if I login from mobile it works perfectly, creates user and also sync user info to database through clerk webhooks.

Upvotes: 0

Views: 252

Answers (0)

Related Questions