Discourse SSO with Supabase Magic Link login
I have a NextJS + Supabase app where I'm using magic link for Auth. I also have a Discourse (https://www.discourse.org) instance setup on one of the app subdomains. I want to log in to the Discourse forum using the Supabase Auth already setup. Discourse allows for this by including a payload containing the redirect_url in the url for the login route (see screenshot and doc link below). How can I include this in the magic link that Supabase sends to the user's email? (I'm using Amazon SES for the custom SMTP)
Supabase login code in my app:
Reference doc for setting up SSO in Discourse: https://meta.discourse.org/t/setup-discourseconnect-official-single-sign-on-for-discourse-sso/13045
Supabase login code in my app:
Reference doc for setting up SSO in Discourse: https://meta.discourse.org/t/setup-discourseconnect-official-single-sign-on-for-discourse-sso/13045

Discourse - Civilized Discussion
Discourse is modern forum software for your community. Use it as a mailing list, discussion forum, long-form chat room, and more!
Discourse Meta
DiscourseConnect allows you to configure “Single Sign-On (SSO)” to completely outsource all user registration and login from Discourse to another site.
(Feb 2021) ‘Discourse SSO’ is now ‘DiscourseConnect’. If you are running an old version of Discourse, the settings below will be named sso_... rather than discourseconnect... The Probl...
