Skip to content

feat: add user accounts links - #338

Open
marftn wants to merge 18 commits into
mainfrom
feat/user-social-links
Open

marftn wants to merge 18 commits into
mainfrom
feat/user-social-links

Conversation

@marftn

@marftn marftn commented Oct 13, 2026

Copy link
Copy Markdown

This PR adds a way for the users to edit their accounts links for

  • renkulab.io
  • GitHub
  • LinkedIn

Admins can edit any user's profile, and users can only edit their own profile.

related issue: #285 (without the email change part)

Some Notes

No Account Links in Register

Only an Edit method is necessary. When the user registers, the user is created with no renku/github/linkedin information because Keycloak does not ask for those. It's the frontend job to redirect the user to a page where they'll enter the missing information and send an Edit request.

No Validation of Github/Linkedin/Renku usernames

The backend validates that the URL has the right domain and format, but it doesn't check whether the user actually exists. It never sends a request to github/renku/linkedin. I did this on purpose for two reasons:

  1. This would introduce some rate-limiting issues (e.g. github only allows 60 requests per hour per IP) which will break the backend's behavior.
  2. Dealing with external websites behaviors is not easy. For example, Linkedin returns an error code 999 to unauthenticated users. The backend having no linkedin account, it's not possible to tell whether a user exists or not.

What I suggest instead: in the frontend edit form, show the cleaned-up link right away so the user can click it and confirm it's their profile. A user can see in a second whether the link is right, which no automated check can match.

The backend expects full URLs, not usernames

I think it would be nice if the frontend would let users enter only their renku/github/linkedin username as well as the full URL and adapt it to a proper URL before sending it to the backend. This would give more flexibility for the user. E.g. a user could enter either bob-wonderland or https://github.com/bob-wonderland/, both would be translated to https://github.com/bob-wonderland before sending the request to the backend.

I did not add this flexibility in the backend because I though it was important to make it explicit which websites the usernames were pointing to when sending them to the backend. I chose to use the full URLs instead of the usernames to avoid attention mistakes that are hard to debug (e.g. sending a github username bob-wonderland as a linkedin username). But let me know if you think that's wrong.

@marftn
marftn requested a review from sabinem October 13, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant