Skip to content

Commit df55f9b

Browse files
authored
Add a link to OpenID Issuer URL in WebFinger response (#26000)
This change adds an entry to the `links` field of the `/.well-known/webfinger` response. The new entry points to the `appURL` as an OpenID issuer. This is consistent with the output of `/.well-known/openid-configuration`, which also uses the value of `appURL`. This change is required for Tailscale SSO to work, as it uses the OpenID Issuer URL when querying the Tailscale user email during signup/login ([docs](https://tailscale.com/kb/1240/sso-custom-oidc/#webfinger-setup)).
1 parent 01c0460 commit df55f9b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

routers/web/webfinger.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,10 @@ func WebfingerQuery(ctx *context.Context) {
106106
Type: "application/activity+json",
107107
Href: appURL.String() + "api/v1/activitypub/user-id/" + fmt.Sprint(u.ID),
108108
},
109+
{
110+
Rel: "http://openid.net/specs/connect/1.0/issuer",
111+
Href: appURL.String(),
112+
},
109113
}
110114

111115
ctx.Resp.Header().Add("Access-Control-Allow-Origin", "*")

0 commit comments

Comments
 (0)