leandroercoli / SaasterKit

A Next.js Boilerplate Kit designed to streamline the development process and accelerate the creation of modern web applications with pre-configured essential features.
90 stars 22 forks source link

BUG: Failure in sign in with Google #5

Open avibathula opened 1 month ago

avibathula commented 1 month ago

Hi - just followed your instructions and didn't do much. Within Clerk I enabled Google authentication in Clerk and the initial website opened up properly. HURRAY!!!! πŸ‘

When I attempted to sign in, Clerk took me through the google auth and then I see "Dashboard" button instead of text link asking me to sign in - seem to be second HURRAY!!!! πŸ‘ πŸ‘

When I click on "Dashboard" - I am seeing

 GET / 200 in 935ms
 β—‹ Compiling /[locale]/dashboard ...
 βœ“ Compiled /[locale]/dashboard in 1672ms (4778 modules)
 GET /dashboard?_rsc=14foe 200 in 6507ms
 β¨― src/libs/database/utils.ts (38:22) @ getSignedInUserOrThrow
 β¨― Error: User not signed in
    at getSignedInUserOrThrow (./src/libs/database/utils.ts:37:22)
    at async getUserRecentTodoItems (./src/libs/database/functions/todo/getUserRecentTodoItems.ts:14:26)
    at async Dashboard (dashboard/page.tsx:17:29)
digest: "2725572128"
  36 | export async function getSignedInUserOrThrow(include?: Prisma.UserInclude) {
  37 |     const user = await getSignedInUser(include);
> 38 |     if (!user) throw new Error('User not signed in');
     |                      ^
  39 |
  40 |     return user;
  41 | }

and the UI is showing "Something is wrong" .... NOT HURRAY πŸ‘Ž πŸ‘Ž πŸ‘Ž

brycebayens commented 1 week ago

Same!