Topic: Token generator
I would like to develop an application where the user can add records to the database without the need of register.
After that he will receive by email an url to edit or delete that record.
A good example of this approach is doodle.
In doodle we can add an appointment/schedule without register. After that we will receive by email the url where other people can contribute and the url to edit or delete the appointment.
For instance, the url is like that:
http://www.doodle.com/6zd6r3fspv2cpq59 -> For visualization and participation of other persons
http://www.doodle.com/6zd6r3fspv2cpq597r4fw29n/admin -> The link for the creator of the record. To edit or delete the pool.
My approach is similar. I would like to have a token for edit or delete and a partial (part of) token for visualization. What will be the best approach for this ?
I can generate the token with a random string or a UUID to be the unique id of my table. The problem is with the partial of that token because I can’t guarantee that when I truncate the token I don’t get more than one record. I’m missing something ? What is your advice for this particular case?
You opinion and help is highly appreciated.
Best regards,