You are often told to set a different password for each account, but this is troublesome. A good option is to register and log in to popular websites through social media accounts , your account will be safe and you don’t need to set a unique password for it. If you need the services of a website, but you are skeptical about it, then you can use the “temporary email” service.
· Login & Get Google Account Data (index.php) In this file, the API authentication and authorization process are handled using PHP. Initially, The login URL is generated for authentication and Google Sign-in button is shown to the user. If the user authenticates with their Google account, the following happens:
· For login with Google Account using PHP, Google has provide Google OAuth API, which is very easy and helpful to you for implement login using Google account into your Website. Google Login API has provide rights to user to login into the website by using their Google account credential without register on that particular website.
· Use Google API Client Library to make user registration and login system on your website. Login System in PHP. Step 1 : At first generate google API and secret key from https://console.developers.google.com this link and download the “GoogleClient” and “Google Oauth2Service“. Step 2 : create a php file named index.php containing following codes
· to login you store $openid->identity in $_session. You should [regenerate session])(php.net/manual/en/function.session-regenerate-id.php) after you store data in the $_SESSION to prevent session fixation. To logout you just destroy session using session_destroy. Keep in mind that users still needs to logout of Google.
· Step 3: Create Login Pro File. in this step, we will write code for mysql database logic for check if already exist google id then login and update google id. So let’s add following file. login_pro.php <?php. session_start(); $_SESSION["id"] = $_POST["id"]; $_SESSION["name"] = $_POST["name"]; $_SESSION["email"] = $_POST["email"];
· Login to your Gmail account and give confirmation that it is you. Say yes! Now you can send email in PHP using Google Gmail SMTP for free. Refer to code a custom Gmail email inbox using PHP …
The first one is to provide a username and password if they already have an account with your site. And the other is to log in on your site with their existing Google account. When they click on the Login With Google button, it initiates the Google login flow and takes users to the Google site for login. Once there, they log in with their Google credentials, and after that they will be redirected to the consent page.
· A Google account with Gmail enabled. Step 1: Install the Google Client Library composer require google/apiclient:^2.0. See the library’s installation page for the alternative installation options. Step 2: Set up the sample. Create a file named quickstart.php in your working directory and copy in the following code:
Gmail is email that’s intuitive, efficient, and useful. 15 GB of storage, less spam, and mobile access.
· In this case you use the gmail domain:smtp.gmail.com.The phpmailer needs this information to identify the host the email is authenticanting the receiver.This is important to know if the its a true email.It s a techinque to avoid to send spams. –