Hi
I have a problem with login with google account. I set all including client id and secret key but google return me error:
Error 400: redirect_uri_mismatch
You can't connect to this app because it doesn't follow Google's OAuth 2.0 policy.
If you are the app developer, register the redirect URI in the Google Cloud Console.
Request details: redirect_uri=
https://mywebsite.ro/login.php?hauth.done=Google
Related developer documentation.
In fact most redirect to
https://mywebsite.ro not
https://mywebsite.ro/login.php ...this is the settings in the console.cloud.google.com and google do not accept other sign like /.
I don't know where is redirect seeting in webpage.
Thank you
PS i try to add to redirect:
https://mywebsite.com/login.php/?hauth.done=Google but not work. I dont understand what can i do to make config file.
Thank you again.
I did it! but now, when i go to succes page i have this error: Warning: Undefined array key "email" in D:\wamp64\www\folder\login-ok.php on line 118
in login-ok.php i have this:
On top page:
<?php
session_start();
if (!isset($_SESSION['username']))
{
header('Location: ./stop.php');
exit;
}
if ($_SESSION['role'] == 'Administrator')
{
header('Location: ./movie.php');
exit;
}
else
if ($_SESSION['role'] == 'Member')
{
header('Location: ./movie.php');
exit;
}
?>
And in 114 --> 137 line have:
<div id="wb_LoginName1">
<span id="LoginName1">Bine ati venit:<?php
if (isset($_SESSION['username']))
{
echo $_SESSION['email'];
}
else
{
echo 'Not logged in';
}
?>!</span>
</div>
<div id="wb_LoginName2">
<span id="LoginName2"><?php
if (isset($_SESSION['username']))
{
echo $_SESSION['email'];
}
else
{
echo '';
}
?></span>
</div>