Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOGIN ERROR #6

Closed
dhifafaz opened this issue Aug 1, 2024 · 5 comments
Closed

LOGIN ERROR #6

dhifafaz opened this issue Aug 1, 2024 · 5 comments

Comments

@dhifafaz
Copy link

dhifafaz commented Aug 1, 2024

I found that my self can't login into the system when using google account

Here are the error log

[auth][error] MissingSecret: Please define a `secret`. Read more at https://errors.authjs.dev#missingsecret at ..next/server/app/api/[...nextauth]/route.js:399:48444 at iJ (..next/server/app/api/[...nextauth]/route.js:399:51038) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ..next/server/app/api/[...nextauth]/route.js:11:101046 at async T.execute (..next/server/app/api/[...nextauth]/route.js:11:97939) at async T.handle (..next/server/app/api/[...nextauth]/route.js:11:102313) at async ea.handler (..next/server/app/api/[...nextauth]/route.js:12:20929) at async $ (..next/server/app/api/[...nextauth]/route.js:12:3577) at async runWithTaggedErrors (.node_modules/next/dist/server/web/sandbox/sandbox.js:99:24) at async NextNodeServer.runEdgeFunction (.node_modules/next/dist/server/next-server.js:1177:24) [auth][error] MissingSecret: Please define a `secret`. Read more at https://errors.authjs.dev#missingsecret at ..next/server/app/api/[...nextauth]/route.js:399:48444 at iJ (..next/server/app/api/[...nextauth]/route.js:399:51038) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ..next/server/app/api/[...nextauth]/route.js:11:101046 at async T.execute (..next/server/app/api/[...nextauth]/route.js:11:97939) at async T.handle (..next/server/app/api/[...nextauth]/route.js:11:102313) at async ea.handler (..next/server/app/api/[...nextauth]/route.js:12:20929) at async $ (..next/server/app/api/[...nextauth]/route.js:12:3577) at async runWithTaggedErrors (.node_modules/next/dist/server/web/sandbox/sandbox.js:99:24) at async NextNodeServer.runEdgeFunction (.node_modules/next/dist/server/next-server.js:1177:24) [auth][error] MissingSecret: Please define a `secret`. Read more at https://errors.authjs.dev#missingsecret at ..next/server/app/api/[...nextauth]/route.js:399:48444 at iJ (..next/server/app/api/[...nextauth]/route.js:399:51038) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ..next/server/app/api/[...nextauth]/route.js:11:101046 at async T.execute (..next/server/app/api/[...nextauth]/route.js:11:97939) at async T.handle (..next/server/app/api/[...nextauth]/route.js:11:102313) at async ea.handler (..next/server/app/api/[...nextauth]/route.js:12:20929) at async $ (..next/server/app/api/[...nextauth]/route.js:12:3577) at async runWithTaggedErrors (.node_modules/next/dist/server/web/sandbox/sandbox.js:99:24) at async NextNodeServer.runEdgeFunction (.node_modules/next/dist/server/next-server.js:1177:24)

@MaheshtheDev
Copy link
Member

@dhifafaz , you need to have .env file with
BACKEND_SECURITY_KEY=secretKey

@dhifafaz
Copy link
Author

dhifafaz commented Aug 1, 2024

Can i get the .env sample? @MaheshtheDev

@MaheshtheDev
Copy link
Member

@dhifafaz , .env file will something like this, please fill those values

BACKEND_SECURITY_KEY="somerandomstring"
GOOGLE_CLIENT_ID=""
GOOGLE_CLIENT_SECRET=""
SEARCH_API_KEY=""
MEM0_API_KEY=""
OPENAI_API_KEY=""

@dhifafaz
Copy link
Author

dhifafaz commented Aug 2, 2024

@dhifafaz , .env file will something like this, please fill those values

BACKEND_SECURITY_KEY="somerandomstring"
GOOGLE_CLIENT_ID=""
GOOGLE_CLIENT_SECRET=""
SEARCH_API_KEY=""
MEM0_API_KEY=""
OPENAI_API_KEY=""

Im sorry, It works but now i'm getting the mismatch_uri from google auth, like this

image

can you help me with the configuration of Authorized redirect URIs google developers?

@MaheshtheDev
Copy link
Member

redirect URI should be http://localhost:3000/api/auth/callback/google

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants