question

hfawns avatar image
hfawns asked

Email Verification error handling

How does playfab respond to the following failure conditions after the user clicks the email verification link in the email:

  • The link has expired (how long does the link last?)
  • The user is already registered
  • The user is unknown
  • Other failure conditions

In which case is the user is sent to the "Error callback URL" specified in the Email verification template? In such cases does the web server showing the failure message get any information about the cause of the failure, for example, in a query string?

Thanks

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
JayZuo avatar image
JayZuo answered

The auth token expiry depends on the type of email being sent. For a custom template, it expires in 7 days. For standard AccountRecovery and EmailVerification, it’s 24 hours.

Email verification is used to verify contact email address, so the user must be already registered and won't be unknown as you need to specify PlayFabId in SendEmailFromTemplate method.

The error callback url is used whenever there is an issue verifying the token. It looks like the only scenarios that are currently handled in this way are a missing or corrupt/invalid token or an expired token. And you can get an "errorCode=EmailConfirmationTokenDoesNotExist/EmailConfirmationTokenExpired" in your error callback's query string.

There’s another case where the token title id doesn’t align with the called playfab url, but that just returns a bad request error to the caller and does not forward to the error callback url.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.