1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to manage users after logging them in with google auth

Discussion in 'PHP & Perl' started by phpdevsami, Jan 1, 2016.

  1. phpdevsami

    phpdevsami Newbie

    Joined:
    Dec 31, 2015
    Messages:
    13
    Likes Received:
    1
    Gender:
    Male
    Home Page:
    Hey I'm using google auth to login users to my site. What I wanna do is check if user has been banned or something.

    I know I can store user's email and then check if that emails been banned if he logs in next time. Is there any better way of doing it?
     
  2. Asakuura

    Asakuura Newbie

    Joined:
    Oct 9, 2014
    Messages:
    18
    Likes Received:
    4
    Occupation:
    Web Developper
    Location:
    France
    I'm not a google api user, but have you check the documentation before asking?
     
  3. Ivenco

    Ivenco Newbie

    Joined:
    Jun 16, 2014
    Messages:
    9
    Likes Received:
    0
    Email from profile info - best way to identify google user. Access token will be changed on next login.

    Just 'json_decode' received data from /o/oauth2/token and use ['email'] field of returned array.