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 / / ... )

Below is a simple idea, I want to implement

if the custom type is and it was already logged into gmail account it will be redirected to

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

3 answers

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.



Stackoverflow uses its own openid-selector extension .

Someone asked about this before: / ...

Here is a tutorial:



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.



All Articles