Gmail authentication for my php website
I have a php website, I want to authenticate users from gmail first and then let it use my site stuff (like the idea used by /qaru.site / ... )
Below is a simple idea, I want to implement
if the custom type is www.example.com and it was already logged into gmail account it will be redirected to www.example.com/services.php
If the user is not registered, they will be redirected to the gmail login page.
I need a working example, I searched a lot using the term openid, sso, federated login, etc., but I couldn't find any working example
source to share
Everything is explained in Federated Login for Google Account Users from Google ( general description here ). Unfortunately, I don't expect anyone here to write the code from scratch for you.
source to share
Stackoverflow uses its own openid-selector extension .
Someone asked about this before: fooobar.com/questions/297554 / ...
Here is a tutorial: http://remysharp.com/2007/12/21/how-to-integrate-openid-as-your-login-system/
source to share
GMail Suppose you mean a Google account?
This is not a quick or easy process as Google takes privacy very seriously. But here is the complete documentation on authenticating with Google.
source to share