Тёмный

Login With Google Account Using PHP & MySQL 

Vicode Media
Подписаться 7 тыс.
Просмотров 33 тыс.
50% 1

Login With Google Account Using PHP, MySQL, Client API and Bootstrap.
Google Developer Console:
console.develo...
Google API PHP Client:
github.com/goo...
OAuth 2.0 Scopes for Google APIs:
developers.goo...
Source Code:
github.com/ruv...
Hosting I use:
m.do.co/c/e924... (Get $100 in credit over 60 days)
Buy Me a Coffee ;)
paypal.me/Vict...

Опубликовано:

 

2 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 78   
@TristanSirrico
@TristanSirrico 3 года назад
This is the only tutorial that uses the session token from Google properly. Simply using an email or ID without the token allows for accessing arbitrary user data via cookie editing. Thank you.
@Sunny-Gupta1
@Sunny-Gupta1 Год назад
Thank you so much my friend, I have watched 15-16 videos but no one explained better than you. ❤❤
@samdaiber
@samdaiber 3 года назад
Thank you so much! I've been through like 8 different tutorials and this is the only one that actually completely functions. On top of that, your step-by-step way of explaining what you are doing/what's going on, as well as giving access to your source code is very very much appreciated. Thanks again so very much!
@VicodeMedia
@VicodeMedia 3 года назад
You're welcome!
@nikhilshetty9201
@nikhilshetty9201 4 года назад
Hey I was able to complete the video and it worked out very well, I need to run sign in using javascript if u don't mind can u do the tutorial to sign with google using php, javascript/ajax and mysql, It would be nice.
@VicodeMedia
@VicodeMedia 4 года назад
Will keep that in mind for the next tutorials. Thank you!
@kazimrahman7499
@kazimrahman7499 4 года назад
perfect......perfect ........perfect.....!!.....except /* if(!isset($token["error"]) && ($token["error"] != "invalid_grant")) */ bit change..!!Thanks...wanna more and more from you...!!
@jhungulle1898
@jhungulle1898 2 года назад
on 56:37 the error is: you missspelled the second "__contruct"
@CozmoGDev
@CozmoGDev 6 месяцев назад
how can I completely logout? like when I press the login with google button again I will choose the account once more
@vasusharma1974
@vasusharma1974 2 года назад
Thank you so so much, sir, It is proven worthly for my work. Before coming into your video I saw many videos which so confusable but you give all solutions very simple methods and tech one by one step which is appreciable.
@fernandogonzalez6055
@fernandogonzalez6055 4 года назад
Hello Victor, thanks for this video. I have a question. Do you have the video on how to complement this using the "login" button? the is actually not doing anything here, as we are never entering values there to try to log in with my google account from the form it self. Thanks!
@tumpperi3891
@tumpperi3891 3 года назад
Hi, I'm at ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-M4jde7THXAI.html I get the following error: Warning: Trying to access array offset on value of type bool in C:\xampp\htdocs\sandbox\core\controller.Class.php on line 24 I checked from your source code and everything seems to be fine. Is this something to do with a version of PHP? Edit1: $info['id'] returns the ID of the email I'm trying to access from the database, it doesn't exist so I'm having an error. if It exists in the database it works. I don't understand how the if statement makes sense? Edit2: I added this to the line before the if statement $info['id'] ??= false; and it started working.
@shivakrishnan6354
@shivakrishnan6354 2 года назад
thanks a lott mannn
@tumpperi3891
@tumpperi3891 2 года назад
@@shivakrishnan6354 no problem, glad if it helped 👌
@JyotiEntertainmentProduction
At 1:31:35, it shows all the users from the database, when the ID, EMAIL, PASSWORD, SESSION and COOKIE are different for all. I think it should have shown only the user with the current EMAIL-ID that was used to LOG-IN. Please correct me if wrong Sir.
@MeganeDjiane
@MeganeDjiane 3 месяца назад
this really helps, thankyou
@haksenguz
@haksenguz 2 года назад
Thank you very much! It was a very useful tutorial. I was finally able to make Google Sign in to my website. I have a question sir. As I am new to PHP I did not how to make Google sign in on my hosted website. Iuploaded Google API library to my webserver and made Google sign in. It was difficult to do it, since it took long time to upload 30MB file to the server. In web development in commercial websites, when making Google sign in, do you also upload large file to server? Or it is done by other ways? I will be genuinely glad, if you answer me! Thank you!
@RaginiRadhaHasan
@RaginiRadhaHasan 5 месяцев назад
He is thief who eats without work
@swatimishra6204
@swatimishra6204 4 года назад
Hi , pleaseeee HELP ME , I am getting an error saying cURL error 60: SSL certificate problem: unable to get local issuer certificate. Please help me sort out this .
@victordobrovolschi9555
@victordobrovolschi9555 4 года назад
Try to, follow the steps below: Open curl.haxx.se/ca/cacert.pem Copy the entire page and save it as a “cacert.pem” Open your php.ini file and insert or update the following line. curl.cainfo = “[pathtofile]cacert.pem”
@swatimishra6204
@swatimishra6204 4 года назад
@@victordobrovolschi9555 Thank you so much ! It worked :)
@yogesh_madar
@yogesh_madar 3 года назад
i'm getting error sir please solve it Notice: Trying to access array offset on value of type bool in C:\xampp\htdocs\WebDevlopment\Google_Login\core\controller.Class.php on line 50 error!
@thejonellwood
@thejonellwood Год назад
Anyone landing here after the deprecation of the Google + API's? So far I seem to be good to go changing the $gClient value to $Client->addScope(" opneid profile email"); but I have not finished the whole video yet. I have however stopped the error messages when sending the request and the authUrl appears to be formed correctly.
@thejonellwood
@thejonellwood Год назад
at ~37:38 I changed $oAuth = new Google_Service_Oauth2($client) to $oAuth = new Google\Service\Oauth2($gClient); and was able to get data back.
@senju31
@senju31 3 года назад
I'm surprised this doesn't have more views. Also, see if you can invest in better recording equipment. Found it hard to hear you sometimes and I'm using a speakers at that. Otherwise, thanks you for the great tutorial.
@amableproduction4581
@amableproduction4581 2 года назад
Thank you, works great after changing the isset thing. So, if id like to create another page.. with code will check if you are logged in?
@jeel659
@jeel659 4 года назад
When I use var_dump, information can't show, its directing to Gmail account what should I do? Sorry, I'm a newbie Sir.
@bugraates478
@bugraates478 3 года назад
I did it thanksss
@senju31
@senju31 2 года назад
Is logging and signing up with google the same process?
@onkar-1566
@onkar-1566 2 года назад
i have error error: Warning: Trying to access array offset on value of type bool in C:\xampp\htdocs\googleauth\core\controller.class.php on line 37 code:if(!$info['id']){
@albionmorina7265
@albionmorina7265 Год назад
Same error! Have you solve it?
@senju31
@senju31 3 года назад
Have you tried it this year and doe sit still work?
@PeterNordmeyer-hg3pg
@PeterNordmeyer-hg3pg 9 месяцев назад
Smszo
@dinutim1200
@dinutim1200 4 года назад
Nice video !
@scaratlas3347
@scaratlas3347 3 года назад
When I'm running your code and I'm doing login with google its not redirecting me to a new page with the tables. Instead the tables are created in the login page
@scaratlas3347
@scaratlas3347 3 года назад
Never mind I copied your index.php file in your github and it worked. I don't know why the code I copied from this viddo was wrong. Its different from the video the index.php file
@ambesapaulos4323
@ambesapaulos4323 4 года назад
good job
@Loremjpsum
@Loremjpsum 4 года назад
Is there a way that the index.php code could be separated into HTML and PHP
@JahidHasan-zl7om
@JahidHasan-zl7om 4 года назад
can i get the original gmail password to store in my localhost database?
@VicodeMedia
@VicodeMedia 4 года назад
I don't think so.
@JahidHasan-zl7om
@JahidHasan-zl7om 4 года назад
@@VicodeMedia I need the password just like email address so that I can store it in my localhost. Can you help e to do that?
@VicodeMedia
@VicodeMedia 4 года назад
It's impossible to store Google password in your database
@JahidHasan-zl7om
@JahidHasan-zl7om 4 года назад
@@VicodeMedia then how can i change the password if i needed? I see in some website, there is a change password option although i logged into Through gmail. So how they check my current password?
@VicodeMedia
@VicodeMedia 4 года назад
@@JahidHasan-zl7om So when you login with google for the first time the website is storing your google data in the database (Name, Email, avatar and any other details google offers access to). When the user is signing in for the first time on your website you should generate a password for that user and send it to the user email so the next time the user will login it will have the password so it won't need to use google to login anymore. Another way would be to ask the user to enter a password when they login with google for the first time. I am generating a password in this video so you can see how to do that.
@gloryguezo-mevo9916
@gloryguezo-mevo9916 3 года назад
I have a problem Victor I can't see any data in my database
@maryumfiaz2299
@maryumfiaz2299 Год назад
Did you figure it out? Because I'm also not getting any data in my database.
@laoadventuretour5012
@laoadventuretour5012 Год назад
Thank you so much
@codingzone4961
@codingzone4961 3 года назад
realy helpful video
@nikhilshetty9201
@nikhilshetty9201 4 года назад
hey I am facing problem with this lines of code $oAuth = new Google_Service_Oauth2($gClient); $userData = $oAuth->userinfo_v2_me->get(); echo ""; var_dump($userData); echo ""; I think this line is making some problem: $userData = $oAuth->userinfo_v2_me->get();
@nikhilshetty9201
@nikhilshetty9201 4 года назад
can u help me out
@VicodeMedia
@VicodeMedia 4 года назад
What error are you seeing?
@nikhilshetty9201
@nikhilshetty9201 4 года назад
@@VicodeMedia I am not able to see the error its just saying 500 error I have a doubt on $userData = $oAuth->userinfo_v2_me->get(); this lines of codes
@mohaligaon
@mohaligaon 3 года назад
@@nikhilshetty9201 I am also getting the same error...could you resolve it
@balajovidiu9699
@balajovidiu9699 4 года назад
Multumesc frumos! Super de ajutor pentru un incepator ca si mine. Totusi am o intrebare, daca se poate: Dupa ce dai logIn with Google, ti se cer credentialele pentru google. Daca nu intri pe google si sa dai logout de acolo, urmatoarea actiune Login with google nu iti mai cere credentialele. Se poate face cumva ca inainte de Login with google sa faca in mod automat logout de pe google pt utilizatorul logat (daca acesta exista) si abia pe urma sa execute login-ul?
@VicodeMedia
@VicodeMedia 4 года назад
Cu placere! You can do that but think about it like this: As a user, how annoyed do you think I would be if I logged into 5 different services with my Google account, then the first time I logged out of one of them, I have to login to my Gmail account again because that app developer decided that, when I log out of his application, I should also be logged out of Google? That's going to get old really fast. In short, you really don't want to do this... If you still want to do this you could create a button with a link to mail.google.com/mail/u/0/?logout&hl=en
@balajovidiu9699
@balajovidiu9699 4 года назад
@@VicodeMedia Thank you very much that explanation. I was thinking at security: if another user is on that device, then simply by going to Google he/she can access your Google account. But what you replied makes sense. Thanks a lot, again, for your videos! Keep safe & healthy!
@VicodeMedia
@VicodeMedia 4 года назад
@@balajovidiu9699 you're welcome! You don't have to worry about your Google account security. Nobody can access your google account if you use it to login on different websites and apps. Even if someone will hack your website's account they still can't access your google account because the session Google provided you to login is valid for your IP and browser only.
@balajovidiu9699
@balajovidiu9699 4 года назад
@@VicodeMedia Thanks. The same applies to you "Login with Facebook" video? I am using your coding videos to learn web development ☺️
@VicodeMedia
@VicodeMedia 4 года назад
@Balaj Ovidiu yes. The same thing with Facebook. They handle the security for you so you don't have to worry about that. I am happy I was able to help 🙂 Stay safe and keep on coding 👍
@TCG2002
@TCG2002 Год назад
Thanx 🎉
@gusti_j
@gusti_j Год назад
nice
@shreyanshchaurasia_0348
@shreyanshchaurasia_0348 3 года назад
Fetch access token With Auth code gives an error 403
@junewilliams8865
@junewilliams8865 3 года назад
This was very helpful
@jackfolz7013
@jackfolz7013 3 года назад
Best tutorial on RU-vid. Hands down, fabulous job!!
@VicodeMedia
@VicodeMedia 3 года назад
Thank you!
@matthieublanchart5467
@matthieublanchart5467 4 года назад
Nice video !
@onllyons
@onllyons 4 года назад
it's not working
@VicodeMedia
@VicodeMedia 4 года назад
What is not working?
@onllyons
@onllyons 4 года назад
@@VicodeMedia I do not receive messages on gmail and error on the screen
@VicodeMedia
@VicodeMedia 4 года назад
What kind of messages? What errors are you seeing?
@onllyons
@onllyons 4 года назад
@@VicodeMedia do you have a script or video with full php authentication without google or fb. ?
@VicodeMedia
@VicodeMedia 4 года назад
Take a look at this one: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-yOiSlrd6_Ls.html
@prasadbobbyy
@prasadbobbyy 4 года назад
Hi Bro i have lot of doubts in that tutorial. Could you send your email I will ask you...
@VicodeMedia
@VicodeMedia 4 года назад
Hi! What exactly is not working? Did you try the source code?
@prasadbobbyy
@prasadbobbyy 4 года назад
@@VicodeMedia yeah bro my code getting an curlhandler.php error while trying your source code in controller.php
@prasadbobbyy
@prasadbobbyy 4 года назад
@@VicodeMedia Iam sent an email with my project file attachment.Check your email and if u don't mind do solve my problem bro.
Далее
WordPress Login With Google | Create Plugin
39:36
Просмотров 6 тыс.
БАГ ЕЩЕ РАБОТАЕТ?
00:26
Просмотров 96 тыс.
Microservices are Technical Debt
31:59
Просмотров 392 тыс.
How to Login with Google in PHP
10:07
Просмотров 7 тыс.
Facebook Login With PHP SDK and Graph API
34:28
Просмотров 25 тыс.
Login with Google Account using PHP
14:21
Просмотров 18 тыс.
Login with Google using PHP - Beginner Tutorial
18:00
Login With Google Account Using JavaScript
22:41
Просмотров 111 тыс.
Login with Google Account using JavaScript
12:39
Просмотров 13 тыс.