PricingDocsAcademy
Bluesky ...
Wed, Dec 11, 9:12 PM

Login with Discord

  • SteaL

    10 months ago

    Hi, I'm trying to implement a login with discord option on supabase https://supabase.com/docs/guides/auth/social-login/auth-discord.

    I have some troubles to implement the login code in toddle :

    async function signInWithDiscord() {
    const { data, error } = await supabase.auth.signInWithOAuth({
    provider: 'discord',
    })
    }

    Did someone already did it ?
  • Lucas G

    10 months ago

    That snippet won't work, ou have to initiate a supabase client first
  • Andreas Møller

    10 months ago

    We use supabase auth, but not the js lib
  • Lucas G

    10 months ago

    I think you have to use https://<your-ref>.supabase.co/auth/v1/authorize?provider=discord
  • and provide a redirect_to url
  • So something like
  • https://<your-ref>.supabase.co/auth/v1/authorize?provider=google&redirect_to=https://<your-site>.com/welcome
  • SteaL

    10 months ago

    I will try
  • Thanks @Lucas G
  • Was considering using custom formulas too
  • Edwin Paul

    2 months ago

    Hey Lucas, i cant get this to work. Please help!
  • /attachments/1198670539091365990/1291436077583958179/image.png

    Edwin Paul

    2 months ago

  • Edwin Paul

    2 months ago

    405 (Method Not Allowed)
    I'm getting this error
  • You follow those instructions except the JS client part
  • In toddle you use the URL mentioned above

Stop scrolling. Start building.

toddle is a visual web app builder that rivals custom code — but accessible to your entire team!

Try toddle — it's free!

© Copyright 2024 toddle. All rights reserved.