检查具有可访问性的回调URL是否与Auth0控制台中的应用程序设置匹配。如果没有匹配,请确保在Auth0控制台中将回调URL添加到您的应用程序设置中。以下是一个示例Node.js应用程序设置的代码片段,其中包括回调URL的添加:
const auth0 = require('auth0');
const auth0ManagementClient = new auth0.ManagementClient({
domain: '',
clientId: '',
clientSecret: '',
scope: 'read:users write:users'
});
// Add callback URL to application settings
auth0ManagementClient.updateClient({
client_id: '',
callbacks: ['http://localhost:3000/callback'] // Add your callback URL here
})
.then(client => {
console.log(client);
})
.catch(err => {
console.log(err);
});