markbates / markbates/goth

Username populated by sub in Azure AD OIDC a random number

Open
#450 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
6.6k
Forks
631
PR merge metrics
No merged PRs in 30d

Description

Gitea supports the ability to choose nickname, email, or userid for auto registration. The openidConnect provider hard codes the UserID to the 'sub' claim. In Azure AD, the 'sub' claim is an immutable random ID that has no meaning. Can it be possible to specify the claim to use for a username instead?

https://github.com/markbates/goth/blob/master/providers/openidConnect/openidConnect.go

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read providers/openidConnect/openidConnect.go, linked in the issue, and trace where the UserID is populated from the sub claim. Determine how a configurable username claim could fit the provider's existing options, then verify that Azure AD users can use the selected claim instead of the immutable subject identifier.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
authentication
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.