-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
Design en setup database
I have done some research to find a way for a user to save evidence in the form and make this as accessible as possible, for example by not having to log in completely. The intention is also that the user is linked to their evidence while remaining as private as possible, so not with a name and other personal details.
Ultimately, I found a few options by searching online and with the help of AI.
These are the options that seemed interesting and could potentially work:
- Token stored in a cookie
- Token stored in the URL
Token Storage
1. Token stored in a cookie
When the user visits the website and fills in the form and submits it, a token is stored as a cookie.
When the user visits the site again later, the server reads the token from the cookie and knows which user it is.
Disadvantages
- The cookie can be deleted by the user (for example, by clearing browser history).
- The cookie does not work on other devices.
2. Token stored in the URL
When the user visits the website for the first time and submits their data, a token is generated and also visible in the URL.
This token is unique and linked to the user.
Through the URL containing this token, the server can identify the user and retrieve their data without sharing personal information.
Important
- The user must keep the token.
- They can save it in a Notes app, email the link to themselves, or write it down.
Conclusion
I did some more research and about the token saved in the url. I'm not sure why but this is not secure.
I eventually came to the magic link. This makes possible that the user only has to give in his email address. When the user sign is. They will get an link send to there email. That link gives them access to the there personal environment, so that the evidence they submit is linked to them.
In this message i have created an database structure: #86 (comment)