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: update solidstart examples #1525

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JesusP2
Copy link

@JesusP2 JesusP2 commented Apr 4, 2024

Noticed solidstart examples for sessions were outdated.

I decided to use event.locals instead of event.nativeEvent.context because it's what is mentioned in solidstart docs.

@pilcrowonpaper
Copy link
Member

Looks like we just use getRequestHeader() etc?

https://vinxi.vercel.app/api/server/request.html

@JesusP2
Copy link
Author

JesusP2 commented Apr 5, 2024

yeah you're right. It seems like getHeader is just an alias for getRequestHeader

@pilcrowonpaper
Copy link
Member

From the docs, look like you can just pass event instead of nativeEvent

@JesusP2
Copy link
Author

JesusP2 commented Apr 5, 2024

I just tested it and at least for solidstart it must be nativeEvent otherwise you get a ts and runtime error.

Actually solidstart has asyncContext enabled by default so you don't even need to pass the event.

@greglearns
Copy link

greglearns commented Oct 19, 2024

@pilcrowonpaper Related to this, I updated/fixed in a PR the SolidStart example code in the examples repo using what SolidStart mentions in their documentation: lucia-auth/examples#51

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

Successfully merging this pull request may close these issues.

3 participants