Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Team id in slack oidc #1409

Merged
merged 5 commits into from
Jun 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions selfservice/strategy/oidc/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}
1 change: 1 addition & 0 deletions selfservice/strategy/oidc/provider_slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down