Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

be an oauth provider #455

Closed
chadwhitacre opened this issue Jan 10, 2013 · 7 comments
Closed

be an oauth provider #455

chadwhitacre opened this issue Jan 10, 2013 · 7 comments

Comments

@chadwhitacre
Copy link
Contributor

Original: we need an immutable participant id

It's nice internally to use username as the participant_id. It makes it much easier to read other tables, and our db constraints do a good job of handling name changes.

Now that we're starting to implement some partnerships (#89, #443), we need to give them an id that is guaranteed to be immutable (the alternative is to force all of our partners to deal with name changes, which is an untenable architecture).

We should rename participants.id to participants.username, change all indices and keys to match, and then use id for a serial bigint. Username should continue to be unique and the foreign key for our own tables, and id will be unique and what we feed to partners.

@heartpunk
Copy link
Contributor

I think this should be a first step towards potentially building OAuth later, so services can integrate with us, rather than us integrate with them.

@chadwhitacre
Copy link
Contributor Author

Right. Changing this ticket accordingly.

@chadwhitacre
Copy link
Contributor Author

FTR, oauth was suggested by @indirect on rubygems/rubygems.org#500.

@indirect
Copy link

Rather than add an ID, you can simply track external integrations by the token that they possess, and key the tokens list to the username.

@chadwhitacre
Copy link
Contributor Author

@indirect Right. I said the thing about immutable IDs before you helped me realize I was starting to reimplement oauth. :-)

@sigmavirus24
Copy link
Contributor

I think being our own OAuth provider would be awesome for #462, but first we might need an alternate way to identify.

@chadwhitacre
Copy link
Contributor Author

Probably some day. Out of scope for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants