joemasilotti / railsdevs.com

The reverse job board for Ruby on Rails developers.
https://railsdevs.com
MIT License
766 stars 259 forks source link

Access developer profiles via slug, only #645

Closed joemasilotti closed 2 years ago

joemasilotti commented 2 years ago

The goal of this PR is to obfuscate the developer's ID to a hard-to-guess string of characters.

A PR addressing this issue should:

Notes and links:

adrienpoly commented 2 years ago

Rather than uuid have you considered https://github.com/excid3/prefixed_ids ?

I like this Stripe like obfuscated ids

joemasilotti commented 2 years ago

I love Stripe's obfuscated IDs but I don't see the value in a project that doesn't have a real developer API. Said another way, what's the benefit of a developer having an ID of dev_abc123 vs. abc_123 if the only place you ever see it is in the URL of a developer's profile page?

joemasilotti commented 2 years ago

Thanks for bringing this up @adrienpoly. I ended up opening a PR with what prefixed_ids uses under the hood, hashid. I was worried about not being able to salt prefixed_ids which would make it easy to guess URLs. Which kind of defeats the purpose of this task!