Login With Any Platform in React With Supabase (Discord, Google, Facebook, and More!)

  Рет қаралды 35,032

Cooper Codes

Cooper Codes

Күн бұрын

Пікірлер: 54
@UseOf
@UseOf Жыл бұрын
For anyone else who has an issue with sign out causing the app to freeze, you need to change the code he wrote at 10:50 to: supabase.auth.onAuthStateChange(async (event) => { if (event == "SIGNED_IN") { navigate("/success"); } }); Something must have changed on Supabase side which causes this event listener to trigger an infinite navigate loop.
@CooperCodes
@CooperCodes Жыл бұрын
Pinning this, thanks for providing the code here as well.
@michaeltillcock3864
@michaeltillcock3864 Жыл бұрын
legend
@deoarlo
@deoarlo Жыл бұрын
Thanks! just what i need
@SumaSuma-wl6tk
@SumaSuma-wl6tk Жыл бұрын
Not work
@gimmories21
@gimmories21 Жыл бұрын
Thank you
@CooperCodes
@CooperCodes 2 жыл бұрын
Hey It's Cooper Codes, Supabase changed their UI since the recording of this video but everything you need to find regarding Supabase setup should be in the menu here: imgur.com/a/6lIzDPh the redirect URL and other things got tucked away into different sections so hopefully there isn't too much confusion here. Comment here if you are missing anything! Thanks.
@suhmer
@suhmer Ай бұрын
Been trying to find a good Supabase authentication tutorial for a long time but the other ones were very confusing. This video really helped me. Thank you so much!
@iGamerD2
@iGamerD2 Жыл бұрын
My man just carried dashboard handling for my bot, tysm
@CooperCodes
@CooperCodes Жыл бұрын
You are welcome, glad it helped :)
@Hyp3rFX
@Hyp3rFX 2 жыл бұрын
Great video! Thanks so much. ❤ Your seriously underrated.
@CooperCodes
@CooperCodes 2 жыл бұрын
Thank you so much, for some reason I missed this comment. Appreciate the support :)
@zerqPROSPIELER
@zerqPROSPIELER Жыл бұрын
The best tutorial so far bro! Keep it up, sub
@techuser1619
@techuser1619 2 жыл бұрын
Do you think it’s possible to only allow “Sign in with Discord” only if the user is part of a Discord server? Would be cool to give Discord server members access to custom dashboards with their stats.
@CooperCodes
@CooperCodes 2 жыл бұрын
I can definitely integrate something like this into a project. My first assumption is that you create some auth middleware (some in-between steps with your authorization). When you authorize a user on your webpage, you can check the supabase user object to see 1. They logged in with discord 2. Make a call to the discord API with their credentials, seeing if they are part of a certain server. I will note, for a sign in like this you can actually make it so supabase ONLY allows Discord sign ins (pretty legit!). Hopefully this gets you in the right direction. You can do this by going into authorizations in supabase and disabling the email sign in (and for the Auth component shown in this video there is a property I believe to show only the social logins aka Discord on the front end).
@JamesPero
@JamesPero Жыл бұрын
The property is called "onlyThirdPartyProviders" and it's a boolean value.
@Bubuljusak
@Bubuljusak Жыл бұрын
Hello! I have found that supabase o auth with azure in expo React Native is not working… can you give it a go ? And post a video?
@jakubn.6572
@jakubn.6572 4 ай бұрын
Thank you very much! Really appreciate this guide.
@LeighBriody
@LeighBriody Жыл бұрын
Great video ! How do we manage the user who is currently logged in ? Can we store them in a session and use their email as an id for our database ?
@Ross17
@Ross17 Жыл бұрын
it has been very helpful, thank you.
@CooperCodes
@CooperCodes Жыл бұрын
you're welcome! thanks for watching
@AndrewDBrown2020
@AndrewDBrown2020 2 жыл бұрын
That's such a great help - thank you.
@CooperCodes
@CooperCodes Жыл бұрын
You're welcome Andy, appreciate the comment
@robbiewinfield7853
@robbiewinfield7853 11 ай бұрын
Is there any way to not have the login page redirect the user to the success page if they are already logged in? If someone is just interested in switching their account, then this may be useful. I guess what I'm looking for is how to only make it redirect when that user actually just clicked "log in" and not whenever an already logged-in user goes to the login page.
@M4CARBINE556
@M4CARBINE556 2 жыл бұрын
What about navigating to other pages? Will the user still be signed in? Do you have to do the Supabase client on every page?
@Peppzwerg
@Peppzwerg Жыл бұрын
You can pass the userobject down the childs or try using something like redux
@anthonyngooo
@anthonyngooo Жыл бұрын
You can also use something like private routes
@hitesh2293
@hitesh2293 7 ай бұрын
How are you navigating to success page after login? ??
@lolelylove8049
@lolelylove8049 Жыл бұрын
Hm how setup it using google and facebook?
@MarkiMark01
@MarkiMark01 3 ай бұрын
Thank you very much!
@nested9301
@nested9301 Жыл бұрын
is this the free tier ? also what is the diffrence between this and sso
@anthonyngooo
@anthonyngooo Жыл бұрын
Yes this is the free tier. Not sure about the second part of your question
@itsgox
@itsgox Жыл бұрын
so i cant get the user guilds with this?
@GUCKII
@GUCKII Жыл бұрын
why you can't? I haven't tried, but I think you just have to select guilds in URL generator and then you will be able to get data about user guilds.
@RedRhinoPlayz
@RedRhinoPlayz Жыл бұрын
Good Stuff Man
@rgx11zprotv23
@rgx11zprotv23 Жыл бұрын
hey does it work for a mobile version of the app ?
@CooperCodes
@CooperCodes Жыл бұрын
I believe it should, I'd be surprised if it didn't.
@rgx11zprotv23
@rgx11zprotv23 Жыл бұрын
@@CooperCodes thx i'll probably try
@bobo21D
@bobo21D Жыл бұрын
Fantastic vid
@Deus-lo-Vuilt
@Deus-lo-Vuilt Жыл бұрын
thanks for video
@berendvanbeerschot1472
@berendvanbeerschot1472 Жыл бұрын
This is not the safe way to do it. Seems really vulnerable to me!
@CooperCodes
@CooperCodes Жыл бұрын
Could you provide an explanation? This solution is generally standard for authentication, and is secure as long as you trust the calls to Supabase to be secure (which I do). Supabase has excellent token management (managing both refresh and access tokens) which is reliable even from an advanced security perspective.
@berendvanbeerschot1472
@berendvanbeerschot1472 Жыл бұрын
@@CooperCodes You put the url and anon key in the login page instead of in an env for starters.
@CooperCodes
@CooperCodes Жыл бұрын
That is because this is a tutorial (and I don't cover everything), you can easily swap those strings out. If you need to learn how you can check out this video here: kzbin.info/www/bejne/ZpqUmXqHgNxlm6c . I generally note this in videos when using the API keys in string format but I forgot to mention it here.
@soko_sskk
@soko_sskk 2 жыл бұрын
U are the best
@soko_sskk
@soko_sskk 2 жыл бұрын
More supabase tutorials plsss
@CooperCodes
@CooperCodes 2 жыл бұрын
I got you with more supabase stuff, thanks for watching!
Firebase vs Supabase - I Built The Same App With Both
6:21
Your Average Tech Bro
Рет қаралды 130 М.
Google Identity Services Login with React (2023 React Google Login)
19:50
Lazy days…
00:24
Anwar Jibawi
Рет қаралды 9 МЛН
Как Я Брата ОБМАНУЛ (смешное видео, прикол, юмор, поржать)
00:59
Deadpool family by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 7 МЛН
20 Programming Projects That Will Make You A God At Coding
14:27
The Coding Sloth
Рет қаралды 1,5 МЛН
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 771 М.
Learning to code is WASTING your time
7:16
JCisWatching
Рет қаралды 18 М.
React 19 STABLE - I Can't Believe They Changed This
11:18
ByteGrad
Рет қаралды 27 М.
Supabase Crash Course
25:17
Traversy Media
Рет қаралды 134 М.
React Native Database & User Authentication
27:38
Supabase
Рет қаралды 29 М.
I Made an iOS App in MINUTES with This AI Tool!
13:20
Creator Magic
Рет қаралды 423 М.
Winning Google Kickstart Round A 2020 + Facecam
17:10
William Lin (tmwilliamlin168)
Рет қаралды 10 МЛН
Lazy days…
00:24
Anwar Jibawi
Рет қаралды 9 МЛН