Git Product home page Git Product logo

Comments (5)

teunis90 avatar teunis90 commented on July 28, 2024

Please file questions at Stack Overflow, this issue tracker should be use to file bugs!

But I'm in a good mood today :) You should implement this yourself.

In the guide you find a PHP example how you can determine if a user is logged in: https://developers.google.com/identity/toolkit/web/quickstart/php

In short call the GitKit client module:

$gitkitClient = Gitkit_Client::createFromFile(dirname(__FILE__) . '/gitkit-server-config.json');
$gitkitUser = $gitkitClient->getUserInRequest();

Check if the user is logged in, if the e-mail is verified. And if not show the verify link

if ($gitkitUser) {
  echo $gitkitUser->getEmail() . "\n";
  echo $gitkitUser->isEmailVerified() . "\n";
  if($gitkitUser->isEmailVerified() == false) {
    echo $gitkitClient->getEmailVerificationLink($gitkitUser->getEmail()) . "\n";
  }
}

from identity-toolkit-php-client.

redstrike avatar redstrike commented on July 28, 2024

I have already known that, but I wonder is it ok if a user is created an account by using password (email is not verified) and I don't want to force my user to verify their email? In other words, does it necessary to do email verification?

from identity-toolkit-php-client.

bojeil avatar bojeil commented on July 28, 2024

It is up to you whether you want to verify an account email or not. You are not forced to. However if you want to, you have to implement it yourself. However the email verification link has to be emailed to the user's email for them to verify it. You want to make sure the user actually owns that email. Once they click on the oob link you emailed, they will be taken to the widget page to complete verification.

from identity-toolkit-php-client.

teunis90 avatar teunis90 commented on July 28, 2024

@bojeil good point. In extension, It's better to encapsulate the OOB link in your own application so that the oob link url match the domain of the outgoing e-mail. Otherwise your e-mail could be marked as spam.

from identity-toolkit-php-client.

redstrike avatar redstrike commented on July 28, 2024

Thank you very much! This is my first time of implementing a user system with 3rd party system, so I did not sure about "what I should and what I should not".

from identity-toolkit-php-client.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.