GeriLife / companionship

Promoting companionship and well-being for everyone.
European Union Public License 1.2
7 stars 18 forks source link

Consider using sequential ID with base64 encoded URLs for Person model/URLs #73

Open brylie opened 2 years ago

brylie commented 2 years ago

The Person model currently contains an id field which uses UUIDfor unique values. The reason UUID was chosen was so sequential IDs could be avoided in URLs. However, the UUID URLs are quite lengthy.

There may be a way to use the default, sequential ID field for users while adding Base64 encoding for URL parameter. The key functionality is that the URL should not be easy to guess from any given URL.

References

brylie commented 2 years ago

Note, the UID b64 converter is used specifically for user IDs. There doesn't seem to be a general purpose base 64 path converter: https://docs.djangoproject.com/en/4.1/topics/http/urls/#path-converters