I am trying to use the otherwise excellent react-native-app-auth to handle the OAuth part of an app I'm working on.
The server I am contacting expects to have the client_id
and client_secret
included in the body of the token exchange POST request, but it is not being included and therefore results always in a 401 unauthorised response.
I have tried many different config options as specified in the docs, such as passing the client_id and secret in additionalParameters
and customHeaders
.
// Passing this to the authorize method.
const config = {
issuer: 'https://example.dev',
clientId: client_id,
clientSecret: client_secret
redirectUrl: 'myapp://auth_success',
scopes: scopes,
serviceConfiguration: {
tokenEndpoint: 'https://example.dev/access-token',
authorizationEndpoint: `https://example.dev?`,
}
Expected is a 200 response with a fresh auth and refresh token. Instead I get back "parameter "client_secret" and "client_id" is missing.