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.
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.
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!
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!
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 ❤
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.
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.
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.
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 !
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
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.
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.
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
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!
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!!
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.
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?
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 .
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, I got GET Request 404 after a successful login, I am redirected to 404 page. I followed all your instructions in the video. Is this because the Google+ API is now shutdown? Do you have alternative for this? Thanks.
Hi sir, i'm your new Follower :) and i tried your stuff, i get the users details except for the Gender, i don't know if its just the google API problem or my code but i just copied what you've done and the Gender doesn't coming out or listed, any help would much appreciated thanks :)
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 :)
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.
Awesome video, but i seem to get an error on the g-callback.php, the site gives me an error 500 for some reason despite pasting your code on the g-callback.php page. I went to check the google apis, and it’s enabled but also gives an error saying “page loading error. Refresh this page to try again” Any ideas Many thanks for reading
The code is running well for 2 days..but now its shows warning: curl_setopt_array(): unable to create temporary file in GogleApi/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 56 I am using google api version 2.2.2.
Hallo thanks for this tutorial! I only got 1 question: I follow your Facebook SDK login too and it works for me but when I try to add this google too it I cant get it too work do you have a vid how I got both to work on the same website?
Got this error: "Error: invalid_client The OAuth client was not found." and after that you can find some Requist Details. Like the client_ID , redirect_url, response type, acces_type ect.
THANK YOU SO MUCH YOU ARE BEST EVER !!! If possible please help us on HOW TO CREATE PAYMENT GATEWAY FOR SHOPPING OR E'COMMERCE WEBSITE .... THANKS ... :-)
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 Thanks for posting this wonderful video. I am getting this error "Fatal error: Call to undefined method Google_Client::setApplicaionName()" Can you let me know how to fix it? Thanks.
Thanks Senaid.How silly I am! Now I am facing this error after coming to g-callback.php "Fatal error: Call to undefined function GuzzleHttp\Handler\curl_reset() " Can you also tell me how to fix it?
Thanks Senaid.How silly I am! Now I am facing this error after coming to g-callback.php "Fatal error: Call to undefined function GuzzleHttp\Handler\curl_reset() " Can you also tell me how to fix it? (later added) I think I have found this error cause. I had to be at PHP 5.4 above to work. When I run the code in PHP 5.6 it worked like your video. Thanks again for posting wonderful video. Take care
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?
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?
I didn't want to miss anything in the tutorial, because there are people who need it all step-by-step. I am sorry if you had hard time to find what you're looking for. :)
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"
Awesome as usual ! :) how could I safely check if user is logged in correctly? exemple: $stmt = $conn->prepare("SELECT user_accestoken FROM User WHERE user_accestoken = ?"); $stmt->bind_param( "s", $_SESSION['access_token']); $stmt->execute(); $stmt->store_result(); if($stmt->num_rows >0) { echo "You are logged in succesfully"'; } or is the above not safe or inefficiënt regarding to the server recourses.
I was just guessing that that way was more secure? ... so from you're opinion this is as secure as it can get? ... after a user logs in all the data he edits, will be adjusted in the database according to $_SESSION['token'] = user_token, does the token ever changes? and when does it change?
I think that before you go into deeper topic of when/how the token changes, there is ONE thing that you will need to take into consideration... Are you doing anything else with that token, are you using it later or only on callback page? In most cases, you're using it on callback page, so in order to make sure that current visitor is logged in, you just need to verify that there is some session key that you will use to verify if someone is logged in or not, and if that key is not there, just redirect the visitor to your login page. However, if you're using the token for anything else, then still you will always have it inside the session, and you just need to make sure that you catch any error on every API call. If there is an error, that in most cases means that your token is not working, but you can always read the error and see what's wrong.
thank you so much for you're feedback! I am not yet 100% confident with the security of php some times because I mainly don't understand the security holes. Maybe I'll find a lesson from you explaining al possible security vulnerabilities in php in the future ;) for now on I am protected on my site with: brute force, sanitizing input, prepared statements and a generated form field session token, it was told to me to check the token every time the form action is activated. To get back to this topic: how could I manipulate the time a user is signed in? I guess the answer is using cookie variables instead of session variables but I don't know the techniques .
Very helpful thank you very much Missing one issue in video If you're getting backend errors, you should try to retry the service. If you're getting a certificate error, try the following: Save the following to cacert.pem: curl.haxx.se/ca/cacert.pem put it here: C:\xampp\php\extras\ssl\cacert.pem in your php.ini put this line in this section: ;;;;;;;;;;;;;;;;;;;; ; php.ini Options ; ;;;;;;;;;;;;;;;;;;;; curl.cainfo = "C:\xampp\php\extras\ssl\cacert.pem" restart your webserver/apache
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
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!
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!
THANK YOU SO MUCH for making this!!! I've been scouring the web to figure this out - BEST VIDEO EVER!
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!
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!
Thank you, this is exactly what I searched for the entire morning!
Awesome, glad I could help. :)
That's the kind of AT THE POINT TUTORIAL || You delivered what was needed !
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. :)
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?
You didn't do the logout part. Or did I miss? How to login with google+ with different accounts?
I don't do comments but, I will make an exception just this once. Bravo. Great vid. Cheers!
Damn, thank you so much!
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.
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
One of the better explained tutorials. Thank you.
Glad it was helpful!
Excellent. Simple and to the point. Thank you for this!
thank you :)
Kindly share the link where we can learn more about scopes.
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
The 'id" scope is the unique id that google has for every user? Or what it represents exactly?
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.
Hi sir, which editor you are using?
very nice tutorial
thank you
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 !
Great Job - never watched any of your videos before but I am subscribed just from this.
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!!
Great tutorial my friend. You made it simple and easy to understand. Helped a lot. Thanks
Thank you so much! Appreciate the feedback! :)
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
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.
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.
Ovo je super. Svaka čast! Hvala ti
Hvala puno!
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
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.
will it work when we have a live web server ?
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!!
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.
What extension do you use to show your array in such a nice order on chrome?
Derik Stavast he echoed the tag
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 ?
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.
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.
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. :)
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
Awesome man..... I am looking for this one.... Great job.......
Thank you. :)
Thank you very much, days ago I was looking for this. The best method I found. regards
Thank you :)
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
Really informative and workfull criteria i also lerant alot of things from your tutorials.
tkanks you
Good bless you FAbien from Cameroun
Glad I could help :)
Hi, I got GET Request 404 after a successful login, I am redirected to 404 page. I followed all your instructions in the video. Is this because the Google+ API is now shutdown? Do you have alternative for this? Thanks.
Thanks for the course.
Svaka čast! Zbilja si mi uštedio puno vremena. Pozdrav iz Hrvatske.
Hvala puno, drago mi je to čuti! :D
u earned my subs bro, keep it up. I like your explaination
Can u make a tutorial how to store google user info on database
Will do :)
Hi thanks for your effort.Can you please create new video login with google using codeigniter framework.
I am sorry but I am not using CodeIgniter framework, so I can't promise.
Hi sir, i'm your new Follower :) and i tried your stuff, i get the users details except for the Gender, i don't know if its just the google API problem or my code but i just copied what you've done and the Gender doesn't coming out or listed, any help would much appreciated thanks :)
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?
great video. Raw Php as you show it is clean code for a dev environement. Cheers from France.
thank you! :)
yes, you saved my life
Keep coming more videos :)
Thanks, will do!
Thank you so much 👍
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
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.
How to do it without google+ and only with gmail API, as google plus API has already shut down?
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.
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
Awesome video, but i seem to get an error on the g-callback.php, the site gives me an error 500 for some reason despite pasting your code on the g-callback.php page.
I went to check the google apis, and it’s enabled but also gives an error saying “page loading error. Refresh this page to try again”
Any ideas
Many thanks for reading
There has to be some issue in the code if you get 500. Please analyze it a little bit more, and make sure that you are using your details etc.
So the user cannot just type in index.php into the url bar and access the page?
Please do video on dependent select tag .
Girish V There is already one. :)
Here you go ua-cam.com/video/XVsMCtA1Jow/v-deo.html
Hi Men! Excelent video, thanks you very much!
My pleasure, thank you :)
Thank you for this! you made it look so easy
Great Job Gentleman....I really Like It ..
Very nice tutorial !!!
Thanks!!
Awesome,Great Video dude........U r doing a very nice job.....!!!
Kartik Anand thank you! :)
The code is running well for 2 days..but now its shows warning: curl_setopt_array(): unable to create temporary file in GogleApi/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 56
I am using google api version 2.2.2.
Hallo thanks for this tutorial! I only got 1 question: I follow your Facebook SDK login too and it works for me but when I try to add this google too it I cant get it too work do you have a vid how I got both to work on the same website?
What is the problem? They should work without any problem if you implement it just by watching videos.
Got this error: "Error: invalid_client The OAuth client was not found." and after that you can find some Requist Details. Like the client_ID , redirect_url, response type, acces_type ect.
Are you sure that your code is correct? Can you show me?
This is my config.php: "" i think here is the problem otherwise I have no clue what the problem is
Your code is looking good, so please check this: stackoverflow.com/questions/17166848/invalid-client-in-google-oauth2
dobar video ,svaka čast na trudu !
hvala puno!
THANK YOU SO MUCH YOU ARE BEST EVER !!! If possible please help us on HOW TO CREATE PAYMENT GATEWAY FOR SHOPPING OR E'COMMERCE WEBSITE .... THANKS ... :-)
Immanuel Joshua Paul Thank you! I will make a tutorial about that for sure! :)
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...
Is it for a particular google user? Or anybody having google account can sign In?
can you tell me about software user
Hi Thanks for posting this wonderful video. I am getting this error "Fatal error: Call to undefined method Google_Client::setApplicaionName()" Can you let me know how to fix it? Thanks.
tushersuvro you have typo mistake, it needs to be:
setApplicationName()
not
setApplicaionName()
Thanks Senaid.How silly I am! Now I am facing this error after coming to g-callback.php "Fatal error: Call to undefined function GuzzleHttp\Handler\curl_reset() " Can you also tell me how to fix it?
Thanks Senaid.How silly I am! Now I am facing this error after coming to g-callback.php "Fatal error: Call to undefined function GuzzleHttp\Handler\curl_reset() " Can you also tell me how to fix it? (later added) I think I have found this error cause. I had to be at PHP 5.4 above to work. When I run the code in PHP 5.6 it worked like your video. Thanks again for posting wonderful video. Take care
Uhmm, I got confused at some point, when you copied a link into your code, what link was that please?
Can you write time when I did that?
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.
Thanks a lot for the video it was very helpful
Excellent!!!
Thank you!
very very good...thanks for sharing knowledge
thank you :)
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 UA-cam.
i love it! Thank you bro!
you are doing great job , really helpful
My pleasure, 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?
awesome tutorial sir,can u help me for "how to get comments from google+ using php and api?"
I should, will check later. :)
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
Thanks for the tutorial, only the part that you styled te page was kinda meh. (Mostly because i came for the technical part)
I didn't want to miss anything in the tutorial, because there are people who need it all step-by-step. I am sorry if you had hard time to find what you're looking for. :)
I am getting, Access Forbidden! Error 403. What to do to rectify the error?
I am also getting same error. Have your issue solved ?
Hello what is it? Please help me! Fatal error: Uncaught Error: Call to undefined method Google_Client::setRedirectUrl()
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"
How to do it without google+ scope as its already shut down.
Hello sir, When retrieving user information curl is sending connection refused error message could you please resolve
Awesome as usual ! :) how could I safely check if user is logged in correctly? exemple: $stmt = $conn->prepare("SELECT user_accestoken FROM User WHERE user_accestoken = ?");
$stmt->bind_param( "s", $_SESSION['access_token']);
$stmt->execute();
$stmt->store_result();
if($stmt->num_rows >0)
{
echo "You are logged in succesfully"';
}
or is the above not safe or inefficiënt regarding to the server recourses.
Hmm, one thing that I don't understand is why do you even check does it exist in the database or not?
I was just guessing that that way was more secure? ... so from you're opinion this is as secure as it can get? ... after a user logs in all the data he edits, will be adjusted in the database according to $_SESSION['token'] = user_token, does the token ever changes? and when does it change?
I think that before you go into deeper topic of when/how the token changes, there is ONE thing that you will need to take into consideration... Are you doing anything else with that token, are you using it later or only on callback page?
In most cases, you're using it on callback page, so in order to make sure that current visitor is logged in, you just need to verify that there is some session key that you will use to verify if someone is logged in or not, and if that key is not there, just redirect the visitor to your login page.
However, if you're using the token for anything else, then still you will always have it inside the session, and you just need to make sure that you catch any error on every API call. If there is an error, that in most cases means that your token is not working, but you can always read the error and see what's wrong.
thank you so much for you're feedback!
I am not yet 100% confident with the security of php some times because I mainly don't understand the security holes. Maybe I'll find a lesson from you explaining al possible security vulnerabilities in php in the future ;) for now on I am protected on my site with: brute force, sanitizing input, prepared statements and a generated form field session token, it was told to me to check the token every time the form action is activated.
To get back to this topic: how could I manipulate the time a user is signed in? I guess the answer is using cookie variables instead of session variables but I don't know the techniques .
I think that you're doing a pretty great job with the security of your website! What do you mean by "manipulate", can you elaborate on that?
where can i find documentation if i want to display user's timeline post into webpage !
Check this: developers.google.com/identity/sign-in/web/people
Very helpful thank you very much
Missing one issue in video
If you're getting backend errors, you should try to retry the service. If you're getting a certificate error, try the following:
Save the following to cacert.pem: curl.haxx.se/ca/cacert.pem
put it here:
C:\xampp\php\extras\ssl\cacert.pem
in your php.ini put this line in this section:
;;;;;;;;;;;;;;;;;;;;
; php.ini Options ;
;;;;;;;;;;;;;;;;;;;;
curl.cainfo = "C:\xampp\php\extras\ssl\cacert.pem"
restart your webserver/apache
Thank you for nice words and also for helping others with the certificate error. Great job!