Firebase Authentication in Unity with Google & other providers (REST API)

  Рет қаралды 24,697

uNicoDev

uNicoDev

4 жыл бұрын

[UPDATE] Google deprecated the manual copy/paste method shown in this video. Check out this one for the updated version: • Firebase Authenticatio...
A tutorial video on how to sign up or sign in a new user into Firebase using an external provider such as Google, using REST APIs, in Unity!
- - - - - - - - -
- Check out this tutorial's code on Github: github.com/rotolonico/Firebas...
- My Firebase Authentication video: • How to set up Firebase...
References:
- OAuth reference: developers.google.com/identit...
- Firebase Auth REST API reference: firebase.google.com/docs/refe...
Libraries used:
- RestClient: github.com/proyecto26/RestClient
- FullSerializer: github.com/jacobdufault/fulls...
- - - - - - - - -
- Join my coding discord: / discord
- Music used in the video made by Kevin MacLeod
#unity #firebase #authentication

Пікірлер: 93
@uNicoDev
@uNicoDev 2 жыл бұрын
[UPDATE] Google deprecated the manual copy/paste method shown in this video. Check out this one for the updated version: kzbin.info/www/bejne/fKetY62NgNibfJY&ab_channel=uNicoDev
@diegovillalobos9431
@diegovillalobos9431 4 жыл бұрын
Your tutorials are the best! Thank you !
@seeking_divine
@seeking_divine 4 жыл бұрын
Love ur accent and tutorials bro :) keep it up
@ALEINLOSANGELES1
@ALEINLOSANGELES1 4 жыл бұрын
thank you so much Nico this is all so great :)
@SYBIOTE
@SYBIOTE 3 жыл бұрын
I wanted to ask , which video do u implement the loopback ip for desktop devices
@elusiveelephant2563
@elusiveelephant2563 4 жыл бұрын
Hey Nico, Is there a way to update values in the database? For example, if a player gets a kill and I want to update their kills in the database from a 0 to a 1. This isn't possible with static variables in Unity I don't think. Is there a way to do this?
@jinisunny7023
@jinisunny7023 4 жыл бұрын
How can I use delay in unity 2019.1.5 or less it is saying it is build in 2019.3 so can’t import and also says if you want to import some or every package will not be imported and will show errors if they are used So I continued and full error showed Please help sir
@chiwa-info
@chiwa-info 4 жыл бұрын
Thank you so much Nico! It helps me!
@joaomarianodasilva2630
@joaomarianodasilva2630 2 жыл бұрын
Olá amigo estou tentado fazer uma integração da unity com firebase para controlar um relé com o esp8266 mas não estou conseguindo fazer a alteração da string, se você puder mim ajudar ficarei muito agradecido. Seria mais ou menos assim: chave: led valor: "0" assim: led: "0" e quando eu clicasse novamente no botão mudaria de estado para led: "1"
@aboodriazy3387
@aboodriazy3387 3 жыл бұрын
by this method how can we retrieve user information like username, display picture? can anyone guide me on this?
@thebeyondwithin
@thebeyondwithin 3 жыл бұрын
Grazie for the tutorial Nico! I was wondering how can this be done for Android/IOS? Android/IOS credentials dont have a client_secret so the POST request in the ExchangeCodeForToken method does not work. Also how would you go about securing client_id, client_secret, API_key?
@rehaanmazid2435
@rehaanmazid2435 2 жыл бұрын
Hey Florin! DId you find a solution for this?
@yashprajapati2693
@yashprajapati2693 4 жыл бұрын
hi can i get OAuth2 accesstype after google sign with firebase Auth. in android app
@TrivuzOfficial
@TrivuzOfficial 3 жыл бұрын
Please upload a video that using google auth loopback IP address.
@SalmaCharfi
@SalmaCharfi 4 жыл бұрын
Great tuto thanks! Does firebase auth has account limit ?
@linekan2086
@linekan2086 4 жыл бұрын
Hey! thanks for tutorial! I have a question, in the minute 26:19, How i can extract only the localId from respones.Text? Thanks!
@uNicoDev
@uNicoDev 4 жыл бұрын
You check out the exact response from the docs: firebase.google.com/docs/reference/rest/auth#section-sign-in-with-oauth-credential You create an object that is serializable and that has the public field localId And then use the FullSerializer library to convert the JSON into that object: github.com/jacobdufault/fullserializer I think I showcased this in my Authentication video: kzbin.info/www/bejne/mqKbgXSNgaqiaac
@linekan2086
@linekan2086 4 жыл бұрын
@@uNicoDev Oh, got it! And in that video It solves some more doubts that I had, thank you again!
@alleyesonme1432
@alleyesonme1432 3 жыл бұрын
Good info. But rly, never seen security code in any app or games i played on android. Like, Never. Is there a way to skip that step? Like automatically paste the code?
@TheMinecraftgamesNL
@TheMinecraftgamesNL 3 жыл бұрын
on start i will get the error: "There are 0 candidate types", Idk what that means
@windwhite4654
@windwhite4654 2 жыл бұрын
Can u tell me how can we made that without paste code?
@penart.creativ4490
@penart.creativ4490 3 жыл бұрын
if , hacker decode my apps, and get the secret key code is the problem, how i hide my secret out the script ?
@urus3456
@urus3456 Жыл бұрын
help me pls ı saw "You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy for keeping apps secure. You can let the app developer know that this app doesn't comply with one or more Google validation rules. Daha fazla bilgi"
@diegogutierrezblanco1693
@diegogutierrezblanco1693 4 жыл бұрын
good tutorial. I would like to see the loopback version :)
@mustansirali4071
@mustansirali4071 4 жыл бұрын
uNicoDev please make a loopback version tutorial
@MFBBSubEsp
@MFBBSubEsp 3 жыл бұрын
Sorry the "other" option is not visible in the current google cloud site, can you tell us what shall we set please? it says web, chrome, ios, android, tv, universal windows and application for computers
@jackbud427
@jackbud427 3 жыл бұрын
I chose "Desktop app" and it worked ! Note choosing "Web application" does not work for this specific tutorial (I think you need a web server)
@MFBBSubEsp
@MFBBSubEsp 3 жыл бұрын
@@jackbud427 Thanks for pointing this out, will be very handy to know this =)
@pauloramos2204
@pauloramos2204 4 жыл бұрын
It Works perfectly with Unity 2019.2.15f1 and Firebase. I'm figuring out how to make it Silently after the first login. Any Suggestions?
@sps014
@sps014 4 жыл бұрын
Nice nico , can you do a tutorial on consuming event for getting notified when data on firebase server changes ...
@uNicoDev
@uNicoDev 4 жыл бұрын
Yeah... you can do that using Firebase Cloud Functions & Firebase Notifications! That'd be a fun video to do...
@sps014
@sps014 4 жыл бұрын
@@uNicoDev thanks man ...
@arafathossainarafat4367
@arafathossainarafat4367 4 жыл бұрын
Bro i need this tutorial also please do it fast
@sabric4066
@sabric4066 4 жыл бұрын
very nice tutorial thank you.
@08058804
@08058804 2 жыл бұрын
how to skip the copy&paste ?,I hope user dont need do the copy&paste to play game
@racer_rocky
@racer_rocky 3 жыл бұрын
Can you please make it on mobile number auth?
@abdulmaliqjinad1244
@abdulmaliqjinad1244 2 жыл бұрын
hello please is the tutorial video for the loopback IP address out yet?
@uNicoDev
@uNicoDev 2 жыл бұрын
It just went live: kzbin.info/www/bejne/fKetY62NgNibfJY&ab_channel=uNicoDev Enjoy
@abdulmaliqjinad1244
@abdulmaliqjinad1244 2 жыл бұрын
@@uNicoDev thanks a lot nico you really did save a soul
@berkcan3475
@berkcan3475 3 жыл бұрын
how to get profile picture please
@HighPricedManiac
@HighPricedManiac Жыл бұрын
How did you import the packages? I believe it is hidden in the "..."
@uNicoDev
@uNicoDev Жыл бұрын
The source code is in the description
@mosyd.m3953
@mosyd.m3953 4 жыл бұрын
Hi .. Can you teach me login on facebook firebase ,, i really need it .. please...
@kitty_ovo
@kitty_ovo 3 жыл бұрын
gooooood. jooob man
@davidlorenz2527
@davidlorenz2527 4 жыл бұрын
top tutorial thank you
@fastertech604
@fastertech604 Жыл бұрын
how do Phone Number Auth with rest api please tell
@uNicoDev
@uNicoDev Жыл бұрын
I don't think you really can... all the supported methods are on this page: firebase.google.com/docs/reference/rest/auth If you are authenticating with a phone you are on mobile so you can use the Unity Firebase SDK for Android and IOS :D
@aguileraq
@aguileraq 3 жыл бұрын
a video with Facebook provider? thanks
@Unity_Lab
@Unity_Lab 3 жыл бұрын
it show Debug message Proyecto26.RequestException: HTTP/1.1 404 Not Found
@darkmatter5883
@darkmatter5883 3 жыл бұрын
same for me
@Airvapps
@Airvapps 3 жыл бұрын
I got the same. I missed the part where that sends the payload like this RestClient.Post($"identitytoolkit.googleapis.com/v1/accounts:signInWithIdp?key={api_key}", payLoad)
@96698041
@96698041 3 жыл бұрын
Same for me
@96698041
@96698041 3 жыл бұрын
@@Airvapps I didn't understand what you said here. Can you explain please?
@alexieantoniopinedadelaros6780
@alexieantoniopinedadelaros6780 3 жыл бұрын
I'm getting this error as well: "Proyecto26.RequestException: HTTP/1.1 400 Bad Request"
@AyaMohamed-gv3ii
@AyaMohamed-gv3ii 3 жыл бұрын
Same. Did you solve it?
@96698041
@96698041 3 жыл бұрын
Same error
@ariyabayat5292
@ariyabayat5292 2 жыл бұрын
Please let us know if you managed to find a solution
@adityasher
@adityasher 3 жыл бұрын
I have entered ID and Keys from Google Cloud and Firebase as per you said in the video ( they are from diff project), but I am facing this error when I paste the ID we get after logging in with Google: Proyecto26.RequestException: HTTP/1.1 400 Bad Request Can you please help?
@serinchng3353
@serinchng3353 3 жыл бұрын
did u solve this
@samuellee2131
@samuellee2131 3 жыл бұрын
did u manage to solve this ?
@adityasher
@adityasher 3 жыл бұрын
​@@samuellee2131 yes api keys have to be from same project, i.e. we need to have same project on both google cloud and firebase
@adityasher
@adityasher 3 жыл бұрын
@@serinchng3353 ​ yes api keys have to be from same project, i.e. we need to have same project on both google cloud and firebase
@ariyabayat5292
@ariyabayat5292 2 жыл бұрын
@@adityasher How exactly do you do that? I would really appreciate any clarification on this. It seems many people are stuck on this including me and Id spread the word if I knew the solution. Thanks
@pabloslab
@pabloslab 3 жыл бұрын
i love that akcent bro , make more videos
@miroslavshard
@miroslavshard 4 жыл бұрын
Hi Nico! Can you do a tutorial on Firebase Database security rules?
@uNicoDev
@uNicoDev 4 жыл бұрын
Thank you for the suggestion, I will definitely look into it!
@uNicoDev
@uNicoDev 4 жыл бұрын
Thanks again for the suggestion, the video Is out: kzbin.info/www/bejne/mqnCmJ6Jl5J2npI Part 2 is coming soon!
@miroslavshard
@miroslavshard 4 жыл бұрын
@@uNicoDev Thank you! I will wait for the next tutorial :)
@denistuzlak4707
@denistuzlak4707 3 жыл бұрын
@@uNicoDev Hello niko. I have followed all from this video. I get the code on email but when try to sign in i got error 400 -.- could you please help me :D
@dennisgonzales9521
@dennisgonzales9521 4 жыл бұрын
Awesome!
@darkmatter5883
@darkmatter5883 3 жыл бұрын
Did everything and I'm getting a Proyecto26.RequestException: HTTP/1.1 400 Bad Request when I hit sign in . Something wrong with the RestClient Post in the SignInWithToken function.
@Airvapps
@Airvapps 3 жыл бұрын
I got the same. I missed the part where that sends the payload like this RestClient.Post($"identitytoolkit.googleapis.com/v1/accounts:signInWithIdp?key={api_key}", payLoad)
@96698041
@96698041 3 жыл бұрын
​@@Airvapps I didn't understand what you said here. Can you explain please?
@akashshukla2588
@akashshukla2588 3 жыл бұрын
The process of logging in is wrong. Did you ever logged in using some code to google. This video wasted my half an hour. So did you make the tutorial for Option2 for automatic/Loopback IP address?
@aboodriazy3387
@aboodriazy3387 3 жыл бұрын
please do a tutorial for facebook authentication
@hammadkiani3851
@hammadkiani3851 4 жыл бұрын
can you please make video with facebook authentication
@mosyd.m3953
@mosyd.m3953 4 жыл бұрын
please
@pikusayantan
@pikusayantan 4 жыл бұрын
What is your school Email ID? Kidding :) Nice Tutorial.
@moosesnWoop
@moosesnWoop 4 жыл бұрын
perfect perfect perfect.
@isirapramodith8720
@isirapramodith8720 4 жыл бұрын
thanks
@serkantarakci1
@serkantarakci1 4 жыл бұрын
First, I appreciate for your work. But as a beginner (or maybe as a stupid) I don't understand why is it hard to find an easy tutorial in entire web. I want to learn a simple firebase signup and login in unity. What I expect that from a tutorial is, there are 2 input fields: email and password and there are 2 buttons: signup and login and simple short codes regarding them. But even in official firebase documents and videos there are too many codes, too many complicated stuff. Public,private, protected variables...blabla. For example, In here what is "Get google code"? I have never seen such a thing in apps or games. :( Make it simple bro.
@uNicoDev
@uNicoDev 4 жыл бұрын
Thank you for watching, I am sorry that this didn't fit your needs. This tutorial was specific for Google authentication, if you want an email password authentication tutorial you can check the playlist link in the description and go to my first video!
@uNicoDev
@uNicoDev 4 жыл бұрын
Actually the video you might be interested in is directly linked in the description
@ghostbanana7661
@ghostbanana7661 4 жыл бұрын
#codingThingInThing
@96698041
@96698041 3 жыл бұрын
Proyecto26.RequestException: HTTP/1.1 400 Bad Request
@ariyabayat5292
@ariyabayat5292 2 жыл бұрын
Please let us know if you managed to find a solution. Thank you
@Execute-bd2ei
@Execute-bd2ei 4 жыл бұрын
Too bad I java
@aotahuu4375
@aotahuu4375 4 жыл бұрын
thank you so much Nico this is all so great :)
Firebase Rules Tutorial for your Realtime Database! [PART 1]
21:16
Самый Молодой Актёр Без Оскара 😂
00:13
Глеб Рандалайнен
Рет қаралды 8 МЛН
Cool Items! New Gadgets, Smart Appliances 🌟 By 123 GO! House
00:18
123 GO! HOUSE
Рет қаралды 17 МЛН
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 9 МЛН
Gym belt !! 😂😂  @kauermtt
00:10
Tibo InShape
Рет қаралды 10 МЛН
Unity Sign-in Authentication with Google Firebase 2024
16:47
Authenticate users using google in Unity and Firebase with OAuth2.0
20:55
When RESTful architecture isn't enough...
21:02
Dreams of Code
Рет қаралды 252 М.
Adding Firestore to your Unity game - Firecasts
16:06
Firebase
Рет қаралды 14 М.
An Illustrated Guide to OAuth and OpenID Connect
16:36
OktaDev
Рет қаралды 568 М.
API Key Authentication Best Practices
25:56
Zuplo
Рет қаралды 27 М.
Getting started with Firebase in Unity (2019) - Firecasts
12:54
REST API and OpenAPI: It’s Not an Either/Or Question
9:17
IBM Technology
Рет қаралды 205 М.
How to use Firebase Database in Unity (REST API)
27:36
uNicoDev
Рет қаралды 98 М.
Смартфон УЛУЧШАЕТ ЗРЕНИЕ!?
0:41
ÉЖИ АКСЁНОВ
Рет қаралды 1,2 МЛН
Худшие кожаные чехлы для iPhone
1:00
Rozetked
Рет қаралды 1 МЛН
Cheapest gaming phone? 🤭 #miniphone #smartphone #iphone #fy
0:19
Pockify™
Рет қаралды 4,2 МЛН