Skip to content
Snippets Groups Projects

Repeat SSO user lookup by emails in username/nickname fields

Merged Andrej Shadura requested to merge azure-compat into collabora/staging
1 unresolved thread

When logging in with e.g. OpenID Connect/Azure, two email addresses may be provided, one in "email" field and another in "username" or "nickname". Since this is exactly the opposite of what the separate Azure backend does, migration from Azure to OpenID Connect/Azure needs to try both emails which may be different.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
233 233
234 234 return user
235 235 end
236
237 username = auth['username'] || auth['nickname']
238 if username.include? '@'
239 user = find_by_email(username)
240
241 if user
242 user.mark_login!
243
244 return user
245 end
246 end
  • merged

  • Please register or sign in to reply
    Loading