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

Include team ID in Slack OIDC response #1408

Closed
trobinpl opened this issue Jun 10, 2021 · 0 comments · Fixed by #1409
Closed

Include team ID in Slack OIDC response #1408

trobinpl opened this issue Jun 10, 2021 · 0 comments · Fixed by #1409
Labels
feat New feature or request.

Comments

@trobinpl
Copy link
Contributor

trobinpl commented Jun 10, 2021

Is your feature request related to a problem? Please describe.

Due to the business requirements in my multi-tenant application I need to make sure that when user clicks "Sign in with Slack" he has indeed an account belonging to the team that was previously connected with the tenant this user is trying to log into. Since I haven't found any way of enforcing it during the redirect-to-Slack phase I thought it can be validated in the post-registration hook.

The slack-go package used inside Slack provider seems to include team ID in it's response (it is definitely included in the Slack response itself).
I'm happy to provide such PR I've went ahead and already created the PR #1409 , but wanted to verify if that is indeed the best solution to this problem.

Describe the solution you'd like

The desired change should be as small as adding

Team: identity.Team.ID,

after this line

Describe alternatives you've considered

I was exploring a possibility to add &team param at the end of oauth/authorize request which seems to work fine with the v2 version of this endpoint

trobinpl added a commit to trobinpl/kratos that referenced this issue Jun 10, 2021
@aeneasr aeneasr added the feat New feature or request. label Jun 11, 2021
aeneasr added a commit that referenced this issue Jun 14, 2021
Closes #1408

Co-authored-by: hackerman <3372410+aeneasr@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants