I followed Node.js and Express Tutorial: Authentication Using Passport
export default new Strategy(
{
callbackURL: "http://localhost:8000/login/auth0",
clientID: process.env.AUTH0_CLIENT_ID,
clientSecret: process.env.AUTH0_CLIENT_SECRET,
domain: process.env.AUTH0_DOMAIN,
scope: ["openid", "email", "profile", "read:users", "read:current_user", "read:user_idp_tokens"],
},
/** @type {import("passport-auth0").VerifyFunction} */
async (accessToken, _refreshToken, _extraParams, profile, done) => {
const auth0 = new ManagementClient({
domain: process.env.AUTH0_DOMAIN,
token: accessToken,
});
const user = await auth0.users.get({ id: profile.id });
},
);
I am getting
ManagementApiError: Bad HTTP authentication header format