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

[Docs]: NextJs validation request problem #1673

Open
realtebo opened this issue Aug 22, 2024 · 2 comments
Open

[Docs]: NextJs validation request problem #1673

realtebo opened this issue Aug 22, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@realtebo
Copy link

Description

Page: https://lucia-auth.com/tutorials/username-and-password/nextjs-app

Subtitle: Validate requests

the snippet about lib/auth.ts shows

export const lucia = new Lucia();
but Lucia is not defined at this point, so typescript warns

Cannot find name 'Lucia'. Did you mean 'lucia'?

@realtebo realtebo added the documentation Improvements or additions to documentation label Aug 22, 2024
@nollidnosnhoj
Copy link
Contributor

I believe export const lucia = new Lucia(); is just a random lucia instance needed to show the example of validating requests. You would need to import the lucia instance from the code example under "Update database" in the page you have linked (if you are following that guide).

Or you can import the Lucia class from 'lucia' import { Lucia } from "lucia";. I think that is what the documentation is missing.

@pilcrowonpaper
Copy link
Member

Can you paste the full code block you're referencing?

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

No branches or pull requests

3 participants