I m trying to create login system that uses openid for this I used following code
<?php
require 'openid.php';
try{
$openid = new LightOpenID('www.mydomain.com');
if(!$openid->mode){
if(isset($_GET['login'])){
if(isset($_POST["google"])){
$openid->identity = 'https://www.google.com/accounts/o8/id';
}
elseif(isset($_POST["yahoo"])){
$openid->identity = 'https://me.yahoo.com';
}
else{ //do nothing }
$openid->required = array('namePerson/friendly', 'contact/email');
header('Location: ' . $openid->authUrl());
}
?>
<form action="?login" method="post">
<button id="google" name="google">Login with Google</button>
<button id="yahoo" name="yahoo">Login with Yahoo</button>
</form>
<?php
}
else{
echo 'User ' . ($openid->validate() ? ' has ' : 'has not ') . 'logged in.';
}
} catch(ErrorException $e) {
echo $e->getMessage();
}
?>
This code works fine. But my problem is when user authenticates with google or yahoo they redirect back with parameters added to url(ie with GET method). Is there any way by which I can hide data in url (with POST method).
Thanks in advance.