NickN
Convex Community9mo ago
7 replies
Nick

How to use redirectTo with Convex Auth with Discord

Discord auth allows you to pass a param called state, but it strips all other params. I could put the
redirectTo
value in the state param, but then how can I get Convex Auth to see it and redirect to it after authenticating?

It seems Convex Auth puts the value of
redirectTo
into a cookie. This doesn't work for my use case, since I'm having the user initiate authentication from a button in Discord. Looking at the source code, would y'all be OK if I added support for the discord state param containing a value for redirectTo? Perhaps JSON encoded?

How can I modify the source code of convex auth and test it out? When I change the node module it doesn't seem to have an effect.

Does this work in Clerk?
Was this page helpful?