stack icon indicating copy to clipboard operation
stack copied to clipboard

Connected Accounts do not work

Open kylewhirl opened this issue 8 months ago • 1 comments

🐛 Bug Report

Title:
Google OAuth “connect” flow never completes and redirects back to /handler/sign-in without errors


Environment

  • Stack Auth SDK version: @stackframe/stack v2.8.6
  • Next.js version: 15.2.4

Reproduction Steps

  1. Install and configure Stack Auth per the docs
  2. In stack.ts you only have:
    import "server-only";
    import { StackServerApp } from "@stackframe/stack";
    
    export const stackServerApp = new StackServerApp({
      tokenStore: "nextjs-cookie",
      oauthScopesOnSignIn: {
        google: ["https://www.googleapis.com/auth/business.manage"],
      },
    });
    
  3. Protect via middleware.ts
  4. Create account with email
  5. Sign in with google with the same email

kylewhirl avatar Apr 21 '25 19:04 kylewhirl

I can't reproduce the problem. Are you sure it is caused by the connected account? Is it maybe caused by wrong middleware patterns?

fomalhautb avatar Jul 01 '25 23:07 fomalhautb

Seems the PR related to this was merged and closed. Closing the issue as well :) If you have questions/comments/concerns, let me know.

madster456 avatar Dec 04 '25 20:12 madster456