Real authentication example? #2565
Unanswered
arcataroger
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to figure out how to use SWR for user authentication, but the current example (from #325) isn't really sufficient. That example just mocks setting a cookie and retrieving it, but doesn't really cover where the
fetch()
happens, error handling, caching, etc. Those things get really complicated when we're trying to async login to a remote server, and it's not really clear to me how to chain several useSWR calls together to make a working system.My use case is pretty basic:
Even this relatively simple use case has me stumped, with a few questions I'm not sure how to answer, such as:
Does anyone have a link to a better example or a more thorough writeup?
I'm experimenting with this on my own too, and if I manage to get it working, I'll post it here as a starting place for others...
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions