#Custom authentication with Lucia
9 messages ยท Page 1 of 1 (latest)
For all folks who asked about custom/built-in auth, this might interesting.
cc @spiral stream @tender turtle @spare crag @rancid estuary
Thanks for sharing! Is there a reason I haven't seen an actionWithAuth helper in any of your documents?
No reason, you can copy paste one of the included wrappers and make an action version of it - you will need to go through an internal query/mutation to actually fetch the auth info.
It might be a nice bit of boilerplate to provide
One version of actionWithAuth that would be nice would be one that exposes a runMutationWithAuth and runQueryWithAuth which automatically threads the parameter through, since the auth data is most useful in the context of having a DB to fetch data associated with the user
(PRs welcome, especially if I don't get to it before my break ๐)
๐
@grave egret how do you approach adding an oauth provider to this, have seen an example with nextjs and GitHub, it uses cookies. convex functions don't use cookies. Do we also need nextjs_future middleware , or is there some way we can configure convex functions for provider callbacks.