joschan21 / quill

Quill - A Modern SaaS-Platform Built With Next.js 13
1.88k stars 494 forks source link

authentication issues #47

Open DokLaw opened 9 months ago

DokLaw commented 9 months ago

Hello guys. I have a few issues: I tried to sign in but got this message: This page isn’t working localhost is currently unable to handle this request. HTTP ERROR 500 In the terminal I get: TypeError: Invalid URL code: 'ERR_INVALID_URL input: '/oauth2/auth Your help is appreciated. route.ts: import {handleAuth} from "@kinde-oss/kinde-auth-nextjs/server"; import { NextRequest } from "next/server";

export async function GET(request: NextRequest, {params}: any) { const endpoint = params.kindeAuth; return handleAuth(request, endpoint); }

.env: ID=4901adb23e5043ecbb43b6dd4f6e012f KINDE_CLIENT_SECRET=5CVuqFl9mCg2LUgmVxwuvJnYK3j65mZ2eg3czt57NXQJykK7QC KINDE_ISSUER_URL=https://doklaw2.kinde.com KINDE_SITE_URL=http://localhost:3000 KINDE_POST_LOGOUT_REDIRECT_URL=http://localhost:3000 KINDE_POST_LOGIN_REDIRECT_URL=http://localhost:3000/dashboard

2nd ISSUE: the "Get started" buttons are blue, I don't know why. Also the Chat with your documents in seconds. DokLaw allows you to have conversations with your PDF document. Simply upload your file and start asking questions right away.

Get started is not centered. Again any help would be appreciated.

import MaxWidthWrapper from "@/components/MaxWidthWrapper"; import Link from "next/link"; import { ArrowRight } from "lucide-react"; import { buttonVariants } from "@/components/ui/button"; import Image from 'next/image'

export default function Home() { return ( <>

DokLaw is live!

Chat with your documents in seconds.

DokLaw allows you to have conversations with your PDF document. Simply upload your file and start asking questions right away.

Get started {''}
<div>
    <div className='relative isolate'>
      <div
        aria-hidden='true'
        className='pointer-events-none absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80'>
        <div
          style={{
            clipPath:
              'polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)',
          }}
          className='relative left-[calc(50%-11rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 rotate-[30deg] bg-gradient-to-tr from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%-30rem)] sm:w-[72.1875rem]'
        />
      </div>
      <div>
        <div className='mx-auto max-w-6xl px-6 lg:px-8'>
          <div className='mt-16 flow-root sm:mt-24'>
            <div className='-m-2 rounded-xl bg-gray-900/5 p-2 ring-1 ring-inset ring-gray-900/10 lg:-m-4 lg:rounded-2xl lg:p-4'>
            <Image
            src='/dashboard-preview.jpg'
            alt='product preview'
            width={1364}
            height={866}
            quality={100}
            className='rounded-md bg-white p-2 sm:p-8 md:p-20 shadow-2xl ring-1 ring-gray-900/10'
            /> 
            </div>
          </div>
        </div>
      </div>

      <div
        aria-hidden='true'
        className='pointer-events-none absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80'>
        <div
          style={{
            clipPath:
              'polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)',
          }}
          className='relative left-[calc(50%-13rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 rotate-[30deg] bg-gradient-to-tr from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%-36rem)] sm:w-[72.1875rem]'
        />
      </div>
    </div>
  </div>
  {/* Feature section */}
  <div className='mx-auto mb-32 mt-32 max-w-5xl sm:mt-56'>
    <div className='mb-12 px-6 lg:px-8'>
      <div className='mx-auto max-w-2xl sm:text-center'>
        <h2 className='mt-2 font-bold text-4xl text-gray-900 sm:text-5xl'>
          Start chatting in minutes
        </h2>
        <p className='mt-4 text-lg text-gray-600'>
          Chatting to your PDF files has never been
          easier than with DokLaw.
        </p>
      </div>
    </div>
    {/* steps */}
    <ol className='my-8 space-y-4 pt-8 md:flex md:space-x-12 md:space-y-0'>
      <li className='md:flex-1'>
        <div className='flex flex-col space-y-2 border-l-4 border-zinc-300 py-2 pl-4 md:border-l-0 md:border-t-2 md:pb-0 md:pl-0 md:pt-4'>
          <span className='text-sm font-medium text-blue-600'>
            Step 1
          </span>
          <span className='text-xl font-semibold'>
            Sign up for an account
          </span>
          <span className='mt-2 text-zinc-700'>
            Either starting out with a free plan or
            choose our{' '}
            <Link
              href='/pricing'
              className='text-blue-700 underline underline-offset-2'>
              pro plan
            </Link>
            .
          </span>
        </div>
      </li>
      <li className='md:flex-1'>
        <div className='flex flex-col space-y-2 border-l-4 border-zinc-300 py-2 pl-4 md:border-l-0 md:border-t-2 md:pb-0 md:pl-0 md:pt-4'>
          <span className='text-sm font-medium text-blue-600'>
            Step 2
          </span>
          <span className='text-xl font-semibold'>
            Upload your PDF file
          </span>
          <span className='mt-2 text-zinc-700'>
            We&apos;ll process your file and make it
            ready for you to chat with.
          </span>
        </div>
      </li>
      <li className='md:flex-1'>
        <div className='flex flex-col space-y-2 border-l-4 border-zinc-300 py-2 pl-4 md:border-l-0 md:border-t-2 md:pb-0 md:pl-0 md:pt-4'>
          <span className='text-sm font-medium text-blue-600'>
            Step 3
          </span>
          <span className='text-xl font-semibold'>
            Start asking questions
          </span>
          <span className='mt-2 text-zinc-700'>
            It&apos;s that simple. Try out DokLaw today -
            it really takes less than a minute.
          </span>
        </div>
      </li>
    </ol>

    <div className='mx-auto max-w-6xl px-6 lg:px-8'>
      <div className='mt-16 flow-root sm:mt-24'>
        <div className='-m-2 rounded-xl bg-gray-900/5 p-2 ring-1 ring-inset ring-gray-900/10 lg:-m-4 lg:rounded-2xl lg:p-4'>
          <Image
            src='/file-upload-preview.jpg'
            alt='uploading preview'
            width={1419}
            height={732}
            quality={100}
            className='rounded-md bg-white p-2 sm:p-8 md:p-20 shadow-2xl ring-1 ring-gray-900/10'
          />
        </div>
      </div>
    </div>
  </div>
</>

) }

DokLaw commented 9 months ago

localhost:3000/dashboard : 404 This page could not be found.

baxsm commented 9 months ago

based on the latest documentation of Kinde your api/auth/[kindeAuth]/route.ts should look like this

import {handleAuth} from "@kinde-oss/kinde-auth-nextjs/server";

export const GET = handleAuth();

Check your tailwind config and css files, the "primary" color will be the one changing the Button component to blue.

ui/button.tsx
....
variant: {
        default: "bg-primary text-primary-foreground hover:bg-primary/90",
DokLaw commented 9 months ago

Thank you so much for your help. I was able to resolve the authentication issue, but not the color of the button which remains the same, blue. Again thank you. John.

On Tue, Dec 5, 2023 at 2:56 AM Bobby Aleem @.***> wrote:

based on the latest documentation of Kinde your api/auth/[kindeAuth]/route.ts should look like this

import {handleAuth} from @.***/kinde-auth-nextjs/server";

export const GET = handleAuth();


Check your tailwind config and css files, the "primary" color will be the one changing the Button component to blue.

ui/button.tsx .... variant: { default: "bg-primary text-primary-foreground hover:bg-primary/90",

— Reply to this email directly, view it on GitHub https://github.com/joschan21/quill/issues/47#issuecomment-1840512644, or unsubscribe https://github.com/notifications/unsubscribe-auth/BENH2WBQ446IGMUYONUIIFTYH34XVAVCNFSM6AAAAABAGXY3BGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBQGUYTENRUGQ . You are receiving this because you authored the thread.Message ID: @.***>

--

Dr. John Adu, LLM, Ph.D.

CEO & Founder, Negus & Co. 1142 Florida Street, # 5, San Francisco, CA

  1. Tel: 415-678-7296. Email: @.*** www.neguco.com
CHIRAG-DAMANI-08 commented 8 months ago

Thank you so much for your help. I was able to resolve the authentication issue, but not the color of the button which remains the same, blue. Again thank you. John. On Tue, Dec 5, 2023 at 2:56 AM Bobby Aleem @.> wrote: based on the latest documentation of Kinde your api/auth/[kindeAuth]/route.ts should look like this import {handleAuth} from @./kinde-auth-nextjs/server"; export const GET = handleAuth(); ------------------------------ Check your tailwind config and css files, the "primary" color will be the one changing the Button component to blue. ui/button.tsx .... variant: { default: "bg-primary text-primary-foreground hover:bg-primary/90", — Reply to this email directly, view it on GitHub <#47 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/BENH2WBQ446IGMUYONUIIFTYH34XVAVCNFSM6AAAAABAGXY3BGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBQGUYTENRUGQ . You are receiving this because you authored the thread.Message ID: @.> -- Dr. John Adu, LLM, Ph.D. CEO & Founder, Negus & Co. 1142 Florida Street, # 5, San Francisco, CA 94110. Tel: 415-678-7296. Email: @. www.neguco.com

Hey , how did you resolve the authentication issue , i have the same 404 error