#auth.js

24 messages · Page 1 of 1 (latest)

sage ocean
#

i probably can't help (i've never used auth.js), but can you elaborate on what you mean by "the credentials are legit impossible for me to guess at how"? i'm having trouble comprehending that part of your message. what specifically are you having trouble with?

raw lance
#

it's okay. ill try to find someone who can help.

#

it jsut doenst work idk . wnting simply credentials auth starter or something. or a valid docs for this

#

following what they say doesnt work

sage ocean
#

you're going to need to be more specific to get help from anyone. what does "doesn't work" mean? do you get an error message? some other problem?

raw lance
#

i am specific. i want an implementation of credentials. i mean it doesnt have to be nextauth but iw aas kinda trying to learn something and just ended up wasting a few weeks and getting frustrated

sage ocean
#

no i mean specific about the problem(s) you are hitting. how do you know it "doesn't work"? what observable thing is happening to make you say that?

raw lance
#

i see. sorry im really confused

i think i just need a starter to follow

#

lik eobviouslty i cant do

import { loginGithub } from "@/app/actions";
import { signIn } from "@/lib/auth";

export default function SignIn() {
  return (
    <div className="flex flex-col items-center justify-center h-screen space-y-4">
      <form onSubmit={loginGithub}>
        <button type="submit">Signin with GitHub</button>
      </form>

      <form
        action={async (formData) => {
          "use server";
          await signIn("credentials", formData);
        }}
      >
        <label>
          Email
          <input name="email" type="email" />
        </label>
        <label>
          Password
          <input name="password" type="password" />
        </label>
        <button>Sign In</button>
      </form>
    </div>
  );
}
#

directly in a form like they say

#

are there alternatives to this? like an actual auth library with docs that one can follow?

sage ocean
sage ocean
raw lance
#

one of the zillion?

clerk no
kinde no
--> those are not straight forward and handle everythign for you
lucia deprecated

#

auth.js a lot of people seem to use but incomplete docs. ...

#

and there's no problem but removing the extra form for github login

 GET / 200 in 155ms


anyway appreciate your help / patiences. sorrry i'm very very frustrated.

if anyone has a projec t using nextauth please share the repo so i can implement it.

nothing worse than bad docs >.<

#
 GET /favicon.ico 200 in 21ms
 GET /favicon.ico 200 in 10ms
 ✓ Compiled in 193ms (713 modules)
[auth][warn][debug-enabled] Read more: https://warnings.authjs.dev#debug-enabled
[auth][error] CredentialsSignin: Read more at https://errors.authjs.dev#credentialssignin
    at Module.callback (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/actions/callback/index.js:246:23)
    at async AuthInternal (webpack-internal:///(rsc)/./node_modules/@auth/core/lib/index.js:66:24)  
    at async Auth (webpack-internal:///(rsc)/./node_modules/@auth/core/index.js:127:34)
    at async signIn (webpack-internal:///(rsc)/./node_modules/next-auth/lib/actions.js:53:17)       
    at async $$ACTION_0 (webpack-internal:///(rsc)/./src/components/sign-in.tsx:77:5)
    at async C:\Users\chloe\web\auth-please\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:39:418
    at async rk (C:\Users\chloe\web\auth-please\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:38:8148)
    at async r3 
#
(C:\Users\chloe\web\auth-please\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:41:1256)
    at async doRender (C:\Users\chloe\web\auth-please\node_modules\next\dist\server\base-server.js:1413:30)
    at async cacheEntry.responseCache.get.routeKind (C:\Users\chloe\web\auth-please\node_modules\next\dist\server\base-server.js:1574:28)
    at async DevServer.renderToResponseWithComponentsImpl (C:\Users\chloe\web\auth-please\node_modules\next\dist\server\base-server.js:1482:28)
    at async DevServer.renderPageComponent (C:\Users\chloe\web\auth-please\node_modules\next\dist\server\base-server.js:1908:24)
    at async DevServer.renderToResponseImpl (C:\Users\chloe\web\auth-please\node_modules\next\dist\server\base-server.js:1946:32)
    at async DevServer.pipeImpl (C:\Users\chloe\web\auth-please\node_modules\next\dist\server\base-server.js:921:25)
    at async NextNodeServer.handleCatchallRenderRequest (C:\Users\chloe\web\auth-please\node_modules\next\dist\server\next-server.js:272:17)
    at async DevServer.handleRequestImpl (C:\Users\chloe\web\auth-please\node_modules\next\dist\server\base-server.js:817:17)
    at async C:\Users\chloe\web\auth-please\node_modules\next\dist\server\dev\next-dev-server.js:339:20
    at async Span.traceAsyncFn (C:\Users\chloe\web\auth-

#
please\node_modules\next\dist\trace\trace.js:154:20)
    at async DevServer.handleRequest (C:\Users\chloe\web\auth-please\node_modules\next\dist\server\dev\next-dev-server.js:336:24)
    at async invokeRender (C:\Users\chloe\web\auth-please\node_modules\next\dist\server\lib\router-server.js:173:21)
    at async handleRequest (C:\Users\chloe\web\auth-please\node_modules\next\dist\server\lib\router-server.js:350:24)
    at async requestHandlerImpl (C:\Users\chloe\web\auth-please\node_modules\next\dist\server\lib\router-server.js:374:13)
    at async Server.requestListener (C:\Users\chloe\web\auth-please\node_modules\next\dist\server\lib\start-server.js:141:13)
 ⨯ CredentialsSignin: Read more at https://errors.authjs.dev#credentialssignin
    at async $$ACTION_0 (./src/components/sign-in.tsx:77:5)
digest: "1511269581"
 POST / 500 in 17ms
#

anyway delete this message. where could someone help me do this? sorry id ont have any friends

sage ocean
#

my first suggestion would be to try the support/community for auth.js specifically. for example it looks like they have a discord server (look at the top right of their documentation site)

#

also no need to delete this. maybe someone who has experience with this specific library/configuration will jump in