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

[Feature]: Get session outside of wrapper component #66

Closed
pilcrowOnPaper opened this issue Sep 9, 2022 · 3 comments
Closed

[Feature]: Get session outside of wrapper component #66

pilcrowOnPaper opened this issue Sep 9, 2022 · 3 comments
Labels
feature request New feature requests

Comments

@pilcrowOnPaper
Copy link
Member

pilcrowOnPaper commented Sep 9, 2022

Feature request

Feature Request for: Lucia

Getting session store using getSession cannot be done outside of Lucia.svelte wrapper. While this makes sense, it makes it impossible to get the store in the layout component that wrapper is located in. It would be nice to be able to get the session without having a dependency on the wrapper.

Use case

General

Additional notes

None

@pilcrowOnPaper
Copy link
Member Author

Fix planned for v0.8.4

@pilcrowOnPaper
Copy link
Member Author

pilcrowOnPaper commented Sep 13, 2022

I'll be removing the wrapper entirely and getSession will automatically set the session cookie if empty. Silent refresh will be handled by a separate function.

const session = getSession()
handleSilentRefresh()

@pilcrowOnPaper
Copy link
Member Author

added with #72 (v0.8.4)

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

No branches or pull requests

1 participant