user14097354
user14097354

Reputation: 21

Multiple redirect url not working in slack sso

We have configured two redirect urls (different domain and valid https urls) in the slack app's oauth and permission section. When we try sso it works fine for the first redirect url and when doing sso for the second one we are getting {"ok":false,"error":"bad_redirect_uri"}. Please help us in resolving the issue

Upvotes: 1

Views: 1268

Answers (1)

Mircea
Mircea

Reputation: 61

I had the same issue. The problem is that there are 2 more places where you have to specify the redirect_uri:

  1. In the URL where you send users for authentication to get the verification code https://slack.com/oauth/authorize?scope=your_scopes&redirect_uri=your_redirect_uri&client_id=your_client_app_id
  2. When you exchange the verification code for an access token in the POST request to https://slack.com/api/oauth.access. If you don't provide the redirect_uri specified in the API method documentation https://api.slack.com/methods/oauth.access you will get the {"ok":false,"error":"bad_redirect_uri"} response.

Upvotes: 6

Related Questions