Thanks for your video, but I have a problem since I am a beginner.When I use localhost server, it cannot redirect to the callback.php, saying "localhost doesn't send any data ERR_EMPTY_RESPONSE".
Even though it's almost 3 years later, this tutorial has helped me very much. Your teaching style is not too fast or too slow, and this lesson did exactly what it said it would. Thank you very much.
Dude! that's the way to be straightforward: concise and right to the point! Really found enjoyable and worth watching your vid since it works, I already shared with my classmates. One thing I wanted to add up, for those who miss the implementation of the Log-out button (if you have the code provided by Senaid's web page): //after line 51 in index.php add this code Log-out
Another tip: if you want to retrieve, and not only display, account's givenName, familyName, and so on (such as in a use case where you want to store that information in your own database), don't forget to add scopes to the config.php, in my case i wanted to store givenName and familyName and email from the account so: //in config.php add this to... $gClient->addScope("www.googleapis.com/auth/plus.login www.googleapis.com/auth/userinfo.email www.googleapis.com/auth/userinfo.profile www.googleapis.com/auth/plus.me");
Thank you so much for nice words, sharing with your classmates and also helping others in this community with tips on how to do additional things on the code. You're amazing!
I bookmarked your phpmailer, fb login and google login because I got a remote work that they need me to implement these tasks. Thank you so much! You're a great help.
Before watching this video I didn't know the way it login by Google account but now I think that I can do it easily by following your video thanks bro ❤
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!
I tried the API but got guzzlehttp certificate error. Gone to Client class of Guzzlehttp folder of GoogleApi and set configure defaults function verify to false. Works like a charm. Thanks for the awesome tutorial.
Sorry for my English but it is a translator. my question is: are all the files that your code has necessary? I uploaded it to my subdomain and there are more than 6000 files, obviously replacing index, login, etc. can some be removed?
Hello Senaid, your content helps me so much to learn web development. I'd like to see a tutorial about paypal payments, for example i'd like this functionality: 1. User fills a price form. 2. User gets redirected to PayPal. 3. If the transaction was successfully completed, insert the data from the first step into database. I tried doing this myself but i can't really get it to work, and also i want to see the secure way to do this. Thanks for your tutorials, and keep up the good work, you are awesome !
Awesome, I am so happy that I could help you. :D I will for sure make one tutorial that will cover everything about PayPal payments so that you can integrate it into your website and start selling products/services.
Great tutorial, thanks!! but I do have a question - when I tried to run this on my web server it didn't work (error 500 on the gcallback page), but when I tried running it on localhost it worked perfectly. Anyone knows what could it be?
Thanks for the tutorial. I just have a quick question and would like you to provide me with a good suggestion: Is there any way to minimize or compress the google SDK file? Because its too heavy.
Yea, I just try it, and its working ! Thanks for sharing your knowledge bro. Now i need to working on modifying it to my own style of coding. Thumbs Up! Does GoogleAPI allowed to give response with much more details information? such as Age, Address, Country, etc.
i have 1 question , the way u taught us was from login page to index.php right ? i mean from 1 page to another page, my question is how to implement the same thing but for single-page-application when contents of page changes according to if a user is authenticated or not... Thanks in advance !
Senaid great video. If I'm creating this for a client would I need to create the API in Google Development with the clients credentials, or would I create API for the client using my credentials in Google Development? What would be the best practice?
Thank you :) It all depends on the project, and also from the deal that you have with that specific customer. In most cases, personally, I, will just use client credentials.
Thank you for this!!! I was wondering, though, using this OAuth method, instead of using a Sign in with Google button, can you instead retrieve input from an email and password text field? Meaning, the users will type in their G-mail credentials in the text field and when they hit sign-in, the system will use the credentials in the input fields to authenticate with Google? thanks!
Thank You Mr. Coding Passing. But i want to know how someone can fetch a particular user data when Login to a page base on id in SELECT Statement. Pls Help!!
Hello, very good tutorial, but there is something that is not working, in my system downloaded the zip package of the tutorial, the function that negotiates the token fails as if it did not exist .. (maybe the file is corrupt), or missing some piece is integrated, I have no problem in the PHP version and I only have a problem for the detection of this function. What adjustments do I make? That is the question. Thank you very much for your response beforehand. PHP.5.6.30 Windows
Hi, nice video tutorial. I wanna ask you, how to allow specific users to log-in ? Is there any way to do it via Google Dev console or i have to make it out in my code? The only way that comes on my mind is to compare user ID after login. Is it right or there is some security issue?
Hey @SenaidBacinovic how can I logout form index and login with another email? It login with same email when I logged in again....but I want to to login with another mail... Thanks for this awesome video.
Please read this for awesome explanation: stackoverflow.com/questions/12909332/how-to-logout-of-an-application-where-i-used-oauth2-to-login-with-google/12909563#12909563 :)
hello sir, i want to make something for my school management system that is working with, but I don't have any idea how to make the students receive information from the teacher or the principal and the teacher will able to set an exam for the students based on their id and enable and disable students that are not active. That is the things that I want from my student management system. Could you please help me and explain it to me in detail. thank you so much... your video is helping me a lot to learn coding fast.
hello, for the connection using either google, facebook, twiter and other ... can't we register these users who connect in the MYSQL database? I say that because I made a form for checking emails with the OTP code so I will integrate this connection with google, facebook, twitter, instagram ... can you tell me please
Hi, greettings from Argentina. I have a cuestion. I am working with php too.. I want to store the refresh token in my database to use the token of the user while the user is not on my site. I am building a application that manages the user account (Obviously.. with the user authorization).. How could i get the Refresh token? Thnx
Thanks for your video, but I have a problem since I am a beginner.When I use localhost server, it cannot run the code. I am getting syntax error on login.php. Help me to reslove it.
Sir, I'm having issue of sign out to google. When I click sign out button it successfully sign out and redirect to login page, but when I click login button again it just redirect to index page which is remember my account that been login. It should destroy the access token and when I click login button it needs to select account again and get the permission again to redirect to index page. Can sir or any viewers help me to solve this problem if you see this comments?
Zemo imam jedno pitanje za tebe a tice se login pa ako bi mi mogao dati neko svijetlo na to posto sam stuck lol. Naime pokusavam napraviti program koji ce biti online ili cloud based, ali hocu da koristim jednu scriptu gdje ce ljudi moci imati account a zatim moci dodati sub-accounts koji ce moci vidjeti samo stvari vezane za taj main account. Inspiracija je od Weebly ili Square gdje svi idu na jednu adresu a onda vidi samo sto je njihovo iako je shared website.. Jel takvo nesto moguce ili pametno i kako da to aproach nemogu da savladam taj koncept ili ga previse komplikujem...
Hi i have a question. I am developing a website and integrated the facebook login. At first was testing the ogin with on gmail account and it worked perfectly, i deleted the app permisison on facebook, deleted also in my c panel, deleted it my chache, everything. When i tried to create an account with facebook using the same account it says "sorry email not received by post" , yet when i go to my facebook account in the app section i see my app registered on facebook, but not my cpanel to create the account to give acces to the user to acces the page for the service i am providing. Why is that happening?
can u help me, i got an error for g-callback, it said "Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 77: error setting certificate verify locations: CAfile:......GoogleAPI\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 187"
Hii Senald bro,I am trying to build oAuth 2.0(i.e,Login with "mycompany") for a company as an intern,Can you just tell me how can i relate this video to me!!!And can you suggest any other thing for my project?? Thank you and finally,You are awesome Bro!!
i have a problem bro Parse error: syntax error, unexpected ':', expecting ',' or ')' in C:\xampp\htdocs\login\config.php on line 10 my php version 7.1.11
Thanks, That answer the question : how to simply use the oauth2 api . However your example is not secure, anyone can forge a session variable and create an access token and then have access to the index.php page .
Do you want to become a web developer from scratch??? Check this: bit.ly/devAccelerator
Thanks for your video, but I have a problem since I am a beginner.When I use localhost server, it cannot redirect to the callback.php, saying "localhost doesn't send any data ERR_EMPTY_RESPONSE".
thanks for this lesson . your source code free but maybe bad code for commercial or bot in your source code . tahnks your answ.
Can u make a tutorial how to store google user info on database
I m getting an error in config.php line 8 as
@@ankitajaswani810 May your api library isn't download completely. check for autolaod.php in folder.
Even though it's almost 3 years later, this tutorial has helped me very much. Your teaching style is not too fast or too slow, and this lesson did exactly what it said it would. Thank you very much.
You're very welcome!
@@SenaidBacinovic 😁
@@SenaidBacinovic I would like to communicate with you my email id is spiderangelo@gmail.com plz provide ur mail id
THANK YOU SO MUCH for making this!!! I've been scouring the web to figure this out - BEST VIDEO EVER!
Dude! that's the way to be straightforward: concise and right to the point! Really found enjoyable and worth watching your vid since it works, I already shared with my classmates. One thing I wanted to add up, for those who miss the implementation of the Log-out button (if you have the code provided by Senaid's web page):
//after line 51 in index.php add this code
Log-out
Another tip: if you want to retrieve, and not only display, account's givenName, familyName, and so on (such as in a use case where you want to store that information in your own database), don't forget to add scopes to the config.php, in my case i wanted to store givenName and familyName and email from the account so:
//in config.php add this to...
$gClient->addScope("www.googleapis.com/auth/plus.login www.googleapis.com/auth/userinfo.email www.googleapis.com/auth/userinfo.profile www.googleapis.com/auth/plus.me");
Thank you so much for nice words, sharing with your classmates and also helping others in this community with tips on how to do additional things on the code. You're amazing!
I bookmarked your phpmailer, fb login and google login because I got a remote work that they need me to implement these tasks. Thank you so much! You're a great help.
You're welcome!
Before watching this video I didn't know the way it login by Google account but now I think that I can do it easily by following your video
thanks bro ❤
You can do it!
damn bro, about to reach 1000 subs
so quick from the first 500, you are killing it!
Thank you so much! It wouldn't be possible without the help of my followers. :)
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!
Thank you, this is exactly what I searched for the entire morning!
Awesome, glad I could help. :)
I don't do comments but, I will make an exception just this once. Bravo. Great vid. Cheers!
Damn, thank you so much!
One of the better explained tutorials. Thank you.
Glad it was helpful!
I tried the API but got guzzlehttp certificate error. Gone to Client class of Guzzlehttp folder of GoogleApi and set configure defaults function verify to false. Works like a charm. Thanks for the awesome tutorial.
YOU JUST SAVED MY LIFE
That's the kind of AT THE POINT TUTORIAL || You delivered what was needed !
very nice tutorial
thank you
Sorry for my English but it is a translator. my question is: are all the files that your code has necessary? I uploaded it to my subdomain and there are more than 6000 files, obviously replacing index, login, etc. can some be removed?
yes, you saved my life
Keep coming more videos :)
Thanks, will do!
Hi sir, which editor you are using?
Hello Senaid, your content helps me so much to learn web development.
I'd like to see a tutorial about paypal payments, for example i'd like this functionality:
1. User fills a price form.
2. User gets redirected to PayPal.
3. If the transaction was successfully completed, insert the data from the first step into database.
I tried doing this myself but i can't really get it to work, and also i want to see the secure way to do this.
Thanks for your tutorials, and keep up the good work, you are awesome !
Awesome, I am so happy that I could help you. :D
I will for sure make one tutorial that will cover everything about PayPal payments so that you can integrate it into your website and start selling products/services.
Kindly share the link where we can learn more about scopes.
Ovo je super. Svaka čast! Hvala ti
Hvala puno!
Great Job - never watched any of your videos before but I am subscribed just from this.
Excellent. Simple and to the point. Thank you for this!
thank you :)
Really informative and workfull criteria i also lerant alot of things from your tutorials.
dobar video ,svaka čast na trudu !
hvala puno!
Great tutorial my friend. You made it simple and easy to understand. Helped a lot. Thanks
Thank you so much! Appreciate the feedback! :)
u earned my subs bro, keep it up. I like your explaination
The 'id" scope is the unique id that google has for every user? Or what it represents exactly?
Svaka čast! Zbilja si mi uštedio puno vremena. Pozdrav iz Hrvatske.
Hvala puno, drago mi je to čuti! :D
Awesome man..... I am looking for this one.... Great job.......
Thank you. :)
You didn't do the logout part. Or did I miss? How to login with google+ with different accounts?
Great tutorial, thanks!! but I do have a question - when I tried to run this on my web server it didn't work (error 500 on the gcallback page), but when I tried running it on localhost it worked perfectly. Anyone knows what could it be?
Configure your smpt file
Thanks for the tutorial. I just have a quick question and would like you to provide me with a good suggestion: Is there any way to minimize or compress the google SDK file? Because its too heavy.
will it work when we have a live web server ?
Wow...great tutorial.... thanks dude...so awesome...i gonna try this tomorrow...
Thank you! Have you tried it? :)
Yea, I just try it, and its working ! Thanks for sharing your knowledge bro. Now i need to working on modifying it to my own style of coding. Thumbs Up! Does GoogleAPI allowed to give response with much more details information? such as Age, Address, Country, etc.
Is it nessary to store this data into the database to retrive its data for email and password field functions?
It all depends on your needs.
What extension do you use to show your array in such a nice order on chrome?
Derik Stavast he echoed the tag
i have 1 question , the way u taught us was from login page to index.php right ? i mean from 1 page to another page, my question is how to implement the same thing but for single-page-application when contents of page changes according to if a user is authenticated or not... Thanks in advance !
Senaid great video. If I'm creating this for a client would I need to create the API in Google Development with the clients credentials, or would I create API for the client using my credentials in Google Development? What would be the best practice?
Thank you :)
It all depends on the project, and also from the deal that you have with that specific customer. In most cases, personally, I, will just use client credentials.
Thanks for the course.
Thank you for this! you made it look so easy
Good one! Helpful.Thank you.
Glad to hear that! You're welcome
I am getting syntax error on login.php at 9th line...Help me to reslove it
Great Job Gentleman....I really Like It ..
you are doing great job , really helpful
My pleasure, thank you!
Very nice tutorial !!!
Thanks!!
Thank you for this!!! I was wondering, though, using this OAuth method, instead of using a Sign in with Google button, can you instead retrieve input from an email and password text field? Meaning, the users will type in their G-mail credentials in the text field and when they hit sign-in, the system will use the credentials in the input fields to authenticate with Google? thanks!
Hmm, why would you do that?
Coding Passive Income
hi! nevermind! this method you used was the better one thank you and keep up with the nice tutorials
Thank you so much, and I am sorry that it took a month for me to reply to your comment, but I've lost it in the dozens of others.
hey. I love your videos! can you tell me please, what software do you use ?! thank you !
Thank you so much! I am using PHPStorm.
Thank You Mr. Coding Passing. But i want to know how someone can fetch a particular user data when Login to a page base on id in SELECT Statement. Pls Help!!
Thank you very much, days ago I was looking for this. The best method I found. regards
Thank you :)
Hello Sir, how can we know if user signed out in google , we also need to execute sign out them from our system , how can we do this ?
getting an error ssl certificate problem
Excellent!!!
Thank you!
Hi Men! Excelent video, thanks you very much!
My pleasure, thank you :)
Hello, very good tutorial, but there is something that is not working, in my system downloaded the zip package of the tutorial, the function that negotiates the token fails as if it did not exist .. (maybe the file is corrupt), or missing some piece is integrated, I have no problem in the PHP version and I only have a problem for the detection of this function. What adjustments do I make? That is the question. Thank you very much for your response beforehand. PHP.5.6.30 Windows
Thank you so much 👍
Hi, nice video tutorial.
I wanna ask you, how to allow specific users to log-in ? Is there any way to do it via Google Dev console or i have to make it out in my code? The only way that comes on my mind is to compare user ID after login. Is it right or there is some security issue?
That's completely fine, there is nothing wrong with that approach.
hello sir. first! i want thanks you for this tutorial! thanks u so much!
You are welcome!
Please help sir
Awesome,Great Video dude........U r doing a very nice job.....!!!
Kartik Anand thank you! :)
tkanks you
Good bless you FAbien from Cameroun
Glad I could help :)
Can u make a tutorial how to store google user info on database
Will do :)
So the user cannot just type in index.php into the url bar and access the page?
i love it! Thank you bro!
Thanks a lot for the video it was very helpful
Hey @SenaidBacinovic how can I logout form index and login with another email?
It login with same email when I logged in again....but I want to to login with another mail...
Thanks for this awesome video.
Thank you. You will need to log out manually from your Google account, and after that try to log in again.
Is it not possible to logout from index.php and login with another email from login.php without going through gmail logout? :-)
Please read this for awesome explanation: stackoverflow.com/questions/12909332/how-to-logout-of-an-application-where-i-used-oauth2-to-login-with-google/12909563#12909563 :)
Thanks alot Senaid
very very good...thanks for sharing knowledge
thank you :)
links to url not available
great video. Raw Php as you show it is clean code for a dev environement. Cheers from France.
thank you! :)
Awesome sir you really teach well
thank you :)
hello sir, i want to make something for my school management system that is working with, but I don't have any idea how to make the students receive information from the teacher or the principal and the teacher will able to set an exam for the students based on their id and enable and disable students that are not active. That is the things that I want from my student management system. Could you please help me and explain it to me in detail. thank you so much... your video is helping me a lot to learn coding fast.
www.googleapis.com/auth/plus.login
this scope doesnt exist anymore
what are the solutions to fix it?
Please do video on dependent select tag .
Girish V There is already one. :)
Here you go th-cam.com/video/XVsMCtA1Jow/w-d-xo.html
How to do it without google+ scope as its already shut down.
hello, for the connection using either google, facebook, twiter and other ... can't we register these users who connect in the MYSQL database? I say that because I made a form for checking emails with the OTP code so I will integrate this connection with google, facebook, twitter, instagram ... can you tell me please
Hi, greettings from Argentina.
I have a cuestion.
I am working with php too.. I want to store the refresh token in my database to use the token of the user while the user is not on my site. I am building a application that manages the user account (Obviously.. with the user authorization)..
How could i get the Refresh token? Thnx
nice tutorial bro, you are genius, thanks a lot, you save my time
Awesome, I am so happy that I could help you.
please help me
I am getting, Access Forbidden! Error 403. What to do to rectify the error?
I am also getting same error. Have your issue solved ?
Good work.. makes too easy to work with.. is there any tutorial like this for twitter login..?
thank you :)
I don't have it at the moment, but I am sure you can find some on TH-cam.
Could we get the Google Login example using Gmail API, because Google + plus, should be blocked by the Google.
I agree, will record a new one. :)
thank you! this video solve me a big doubt!
Thanks for your video, but I have a problem since I am a beginner.When I use localhost server, it cannot run the code. I am getting syntax error on login.php. Help me to reslove it.
nice explain. step by step ...thanx
My pleasure, thank you :)
Thank you so much, You make me easy to do my job ..
I am getting syntax error on login.php at 9th line...Help me to reslove it
How to do it without google+ and only with gmail API, as google plus API has already shut down?
Sir, I'm having issue of sign out to google.
When I click sign out button it successfully sign out and redirect to login page, but when I click login button again it just redirect to index page which is remember my account that been login.
It should destroy the access token and when I click login button it needs to select account again and get the permission again to redirect to index page.
Can sir or any viewers help me to solve this problem if you see this comments?
i'm having the same issue. Would really appreciate if someone can solve this.
Zemo imam jedno pitanje za tebe a tice se login pa ako bi mi mogao dati neko svijetlo na to posto sam stuck lol. Naime pokusavam napraviti program koji ce biti online ili cloud based, ali hocu da koristim jednu scriptu gdje ce ljudi moci imati account a zatim moci dodati sub-accounts koji ce moci vidjeti samo stvari vezane za taj main account. Inspiracija je od Weebly ili Square gdje svi idu na jednu adresu a onda vidi samo sto je njihovo iako je shared website.. Jel takvo nesto moguce ili pametno i kako da to aproach nemogu da savladam taj koncept ili ga previse komplikujem...
Sir can you tell me how I can post on page through PHP sdk and graph explore.thanks sir.
Hmm, can you explain a little bit?
very good video. nice explanation.
thank you :)
Hi i have a question. I am developing a website and integrated the facebook login. At first was testing the ogin with on gmail account and it worked perfectly, i deleted the app permisison on facebook, deleted also in my c panel, deleted it my chache, everything. When i tried to create an account with facebook using the same account it says "sorry email not received by post" , yet when i go to my facebook account in the app section i see my app registered on facebook, but not my cpanel to create the account to give acces to the user to acces the page for the service i am providing. Why is that happening?
can u help me, i got an error for g-callback, it said "Fatal error: Uncaught GuzzleHttp\Exception\RequestException: cURL error 77: error setting certificate verify locations: CAfile:......GoogleAPI\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 187"
can you tell me about software user
Hii Senald bro,I am trying to build oAuth 2.0(i.e,Login with "mycompany") for a company as an intern,Can you just tell me how can i relate this video to me!!!And can you suggest any other thing for my project??
Thank you and finally,You are awesome Bro!!
Super keep it up
I like this video lot of time searching on video show very good thanks for this video and source code...
Thank you :)
i have a problem bro Parse error: syntax error, unexpected ':', expecting ',' or ')' in C:\xampp\htdocs\login\config.php on line 10
my php version 7.1.11
Can you show me the code?
@@SenaidBacinovic error on line 9 in config.php
Thanks, That answer the question : how to simply use the oauth2 api . However your example is not secure, anyone can forge a session variable and create an access token and then have access to the index.php page .
Then what's the secure method?
@@a.yashwanth Check the validity of the access token
Hi thank you for this learn 🌹
thank you :)
wonderful dude great work..
Hello sir, When retrieving user information curl is sending connection refused error message could you please resolve
Thanks for sharing. Really helped me in my project.
no information show g-callback.php
@@chirashreebhaduri4538 I think there was. U mean Google call-back right?
yes
no Data show user
No data receieve from user
On localhost working fine. but on server Google auth showing HTTP 403 error forbidden
I am also getting same error. Have your issue solved ?
please discuss with your hosting provider bcoz sometime they block mod security. now my code working fine.
@@vikraantvishwakarma7954 really its working fine? on server
Very Nice
Just Leave It Blank thank you :)