【发布时间】:2017-02-27 21:28:46
【问题描述】:
我正在将 Auth0 集成到现有的客户端项目中,并且在从 Auth0 登录后回调 url 出现了一些问题。
问题在于,当调用回调 URL 时,id_token 和 access_token 仅在哈希片段中可用,而在查询字符串中不可用。为了让它可用于服务器,我需要在查询字符串中使用它。
我的 responseType 是“代码”类型:
this.auth0 = new Auth0({
clientID: clientId,
domain: domain,
responseType: 'code',
callbackURL: 'http://mydevserver:3000/callback'
});
所以问题是,我怎样才能在查询字符串中包含 id_token 和 access_token?
https://auth0.com/docs/tutorials/local-testing-and-development#auth0-and-localhost
【问题讨论】:
标签: javascript authentication auth0