auth0 让客户使用访问令牌连接到我的应用程序

auth0 let customers connect to my app using access token

感谢您阅读这个问题。

我们希望我们的用户能够使用批处理从我们的服务器获取数据。

他们正在使用 node.js。

这是我尝试过的,但没有成功。 你能帮我吗?

var AuthenticationClient = require('auth0').AuthenticationClient;

var auth0 = new AuthenticationClient({
  domain: '...',
  clientId: '...'
});

var data = {
  username: 's@gmail.com  ',
  password: '*****'
};

console.log(auth0.oauth.oauth.token); //<---- undefined
auth0.oauth.token(data, function (err, userData) {
  if (err) {    // Handle error.  }
  console.log(userData);
});

非常感谢

去吧。而不是使用 emailpassword.

我必须使用专门为我的客户生成的 client_idclient_secrect 登录。具有特定权限。

使用 API 菜单下的管理用户界面。

谢谢大家