Best way to validate account by email
shinnokdisengir opened this issue · comments
Gabriele Giovanni Celso Ghio commented
Hi,
I want to validate a subscribed account by email, send him a link like
http://server/validate/{{jwtToken}}
using query strings could be fine too
http://server/validate/?token={{token}}&client_id={{blabla}}
I understood how to issue a new token, but I'm not sure is the best way, I think I'd better to create a new Grant/AuthorizationValidator.
$accessToken = new AccessTokenEntity();
$accessToken->setClient($this->clientRepository->getClientEntity('test'));
$accessToken->setIdentifier('dottore');
$accessToken->setUserIdentifier($account->username);
$accessToken->setExpiryDateTime(new DateTimeImmutable('+1 hour'));
$accessToken->setPrivateKey(new CryptKey('file://' . __DIR__ . '/../../../private.key'));
Are there some examples? Can you help me?
Thanks
Andrew Millington commented
Sorry I think this is a more general OAuth question and is probably better suited to something like Stack Overflow. Apologies I can't be of help in this instance