I have a use case for supplying non-standard query parameters to the authorization endpoint when calling authenticate(). In this case, it's supplying the team parameter when authorizing with Slack. We want users to associate their identity using a team ID that exists in our system, which is not a static value - it varies by user.
Is there a workaround? Can I override the authorizationEndpoint or create a team function in the configuration to do something clever when building the query parameters? If there's no workaround, is this something that will eventually be supported? Slack can't be the only service that can take non-standard parameters in its OAuth flow (https://github.com/sahat/satellizer/issues/396).
Hello,
I have a use case for supplying non-standard query parameters to the authorization endpoint when calling
authenticate()
. In this case, it's supplying theteam
parameter when authorizing with Slack. We want users to associate their identity using a team ID that exists in our system, which is not a static value - it varies by user.Looking at https://github.com/sahat/satellizer/blob/master/src/oauth2.ts#L132, though, it looks like this isn't possible, because in https://github.com/sahat/satellizer/blob/master/src/oauth2.ts#L139, either
paramValue
is a static value or the result of evaluating a function defined in the OAuth configuration, but there's nowhere in theauthenticate
signature where we can supply information accessible by that function.Is there a workaround? Can I override the
authorizationEndpoint
or create ateam
function in the configuration to do something clever when building the query parameters? If there's no workaround, is this something that will eventually be supported? Slack can't be the only service that can take non-standard parameters in its OAuth flow (https://github.com/sahat/satellizer/issues/396).Thanks!