loud-keyboard-84117
04/12/2022, 6:28 AMFailed to obtain access token: {
statusCode: 401,
data: '{"error":"invalid_client","error_description":"Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method)."}'
}
passport.use(
new OAuth2Strategy(
{
authorizationURL: "https://{host}/oauth2/auth",
tokenURL: "https://{host}/oauth2/token",
clientID: HYDRA_CLIENT_ID,
clientSecret: HYDRA_CLIENT_SECRET,
callbackURL: "<https://127.0.0.1:8080/auth/hydra/callback>",
state: true,
scope: ["openid"]
},
function (accessToken, refreshToken, profile, done) {
return done(null, { accessToken, profile });
}
)
);
I found out that passport-oauth2 supports only client_secret_post
and so I changed in database hydra_client
table token_endpoint_auth_method
from client_secret_basic
to client_secret_post
Am I missing something or did anything wrong?