From ca54e2745b1bb5b84599d9fcddb50619d5281113 Mon Sep 17 00:00:00 2001 From: trobinpl Date: Thu, 10 Jun 2021 22:28:09 +0200 Subject: [PATCH 1/4] feat: Include the team ID in the Slack OIDC provider response Closes #1408 --- selfservice/strategy/oidc/provider_slack.go | 1 + 1 file changed, 1 insertion(+) diff --git a/selfservice/strategy/oidc/provider_slack.go b/selfservice/strategy/oidc/provider_slack.go index 5cbb8256cd2d..d9d189e3a116 100644 --- a/selfservice/strategy/oidc/provider_slack.go +++ b/selfservice/strategy/oidc/provider_slack.go @@ -81,6 +81,7 @@ func (d *ProviderSlack) Claims(ctx context.Context, exchange *oauth2.Token) (*Cl Email: identity.User.Email, EmailVerified: true, Picture: identity.User.Image512, + Team: identity.Team.ID, } return claims, nil From 6e1ab59b545a5d0da8bb5ada8d06e305dfb96613 Mon Sep 17 00:00:00 2001 From: trobinpl Date: Thu, 10 Jun 2021 22:38:32 +0200 Subject: [PATCH 2/4] Include team id in the documentation for Slack provider --- .../guides/sign-in-with-github-google-facebook-linkedin.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/versioned_docs/version-v0.6/guides/sign-in-with-github-google-facebook-linkedin.mdx b/docs/versioned_docs/version-v0.6/guides/sign-in-with-github-google-facebook-linkedin.mdx index 1863d6d7e097..7282977ba0fd 100644 --- a/docs/versioned_docs/version-v0.6/guides/sign-in-with-github-google-facebook-linkedin.mdx +++ b/docs/versioned_docs/version-v0.6/guides/sign-in-with-github-google-facebook-linkedin.mdx @@ -166,6 +166,7 @@ sub # alphanumeric slack user id name # username nickname # username preferred_username # username +team # team id slack user belongs to ``` Additionally, the `identity.email` scope will add: From 7d586265bda2bc2382123c5862366d7a9a7ecddb Mon Sep 17 00:00:00 2001 From: trobinpl Date: Thu, 10 Jun 2021 23:03:05 +0200 Subject: [PATCH 3/4] Include team in Claims struct --- selfservice/strategy/oidc/provider.go | 1 + 1 file changed, 1 insertion(+) diff --git a/selfservice/strategy/oidc/provider.go b/selfservice/strategy/oidc/provider.go index 8d483c91b818..dd063ab045b0 100644 --- a/selfservice/strategy/oidc/provider.go +++ b/selfservice/strategy/oidc/provider.go @@ -36,4 +36,5 @@ type Claims struct { PhoneNumberVerified bool `json:"phone_number_verified,omitempty"` UpdatedAt int64 `json:"updated_at,omitempty"` HD string `json:"hd,omitempty"` + Team string `json:"team,omitempty"` } From 4c979fe22a80f635e285c22c311f010d78e75c27 Mon Sep 17 00:00:00 2001 From: trobinpl Date: Sat, 12 Jun 2021 13:18:53 +0200 Subject: [PATCH 4/4] Documentation change --- .../docs/guides/sign-in-with-github-google-facebook-linkedin.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docs/guides/sign-in-with-github-google-facebook-linkedin.mdx b/docs/docs/guides/sign-in-with-github-google-facebook-linkedin.mdx index 1863d6d7e097..7282977ba0fd 100644 --- a/docs/docs/guides/sign-in-with-github-google-facebook-linkedin.mdx +++ b/docs/docs/guides/sign-in-with-github-google-facebook-linkedin.mdx @@ -166,6 +166,7 @@ sub # alphanumeric slack user id name # username nickname # username preferred_username # username +team # team id slack user belongs to ``` Additionally, the `identity.email` scope will add: