Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8972337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:11:43+00:00 2026-06-15T18:11:43+00:00

I have a web application built using Symfony2, in which some items are shared

  • 0

I have a web application built using Symfony2, in which some items are shared with other users. When an item is shared, the user receives a link to that item. I want that the user, receiving the link, when clicks on the email, shall automatically get authenticated to the site. So far, what I have done is:

  1. Generate a unique token with the share link and append it to the link
  2. When the link is clicked by the user with whom it was shared, the unique token is checked and the respective user is authenticated.

However, there are flaws with this method. If some other user copies and pastes the same link in the browser, or the original recipient forwards the mail to someone else, the other user gets authenticated as the original recipient of the link. What should be the approach to get past these flaws ? What I would actually want is:

  1. Links should only authenticate users, when clicked from within the e-mail and no direct access should be allowed.
  2. Users shall only be authenticated if link is clicked from the email to which it was initially sent.

I have read a few questions that were somewhat similar in requirement, but not exactly the same. Also, the response to them led to the conclusion that it is impossible. Is it really ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:11:44+00:00Added an answer on June 15, 2026 at 6:11 pm

    Unfortunately, there’s not much more you can do in this situation.

    You could check the referrer, but as user Cthulhu pointed out, such a check would be unreliable and prone to errors.

    You can:

    1. Ensure that the token in question is unique to their user account. i.e. no two users can have the same token.
    2. Add their user id to the link so that you can validate the token against a specific user account (as opposed to doing a blanket search against all tokens in the database).
    3. Add an expiry date to the token, so that if somebody clicks on the token a month later, it will no longer be valid.
    4. Immediately disable the token after they’ve clicked on the link and verified their email address / account. This ensures that the token can never be re-used.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web application built using Spring which contains some jobs. A typical
All, I have a PHP Web application built using Zend Framework and MVC with
I have built a web application using Java EE platform that sells one of
I have built a little web application with several *.js files. I am using
We have built a web application that accepts SOAP messages, does some processing, calls
I have a web application built using jsp/servlets.The web application session is set to
We have a web based application in production built using django. It is deployed
I have a web service application built using NodeJS. I am using mongodb as
I have a web application that needs to be built using PHP/MySQL. The application
I have built a web application using jQuery and it is working perfectly in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.