#Custom authentication with Lucia

9 messages ยท Page 1 of 1 (latest)

grave egret
#

For all folks who asked about custom/built-in auth, this might interesting.

cc @spiral stream @tender turtle @spare crag @rancid estuary

tender turtle
#

Thanks for sharing! Is there a reason I haven't seen an actionWithAuth helper in any of your documents?

grave egret
#

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.

tender turtle
#

It might be a nice bit of boilerplate to provide

fleet flume
#

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

grave egret
#

(PRs welcome, especially if I don't get to it before my break ๐Ÿ˜‡)

tender turtle
#

๐Ÿ™‚

south pasture
#

@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.