我使用auth0通过angularjs创建函数登录。
当我输入电子邮件和密码登录成功时,不返回消息并再次重定向到登录页面。 我检查返回的数据看不到“ id_token”。
app.js包含配置身份验证
var rootApp = angular.module('xxxx', [ 'auth0.lock', ]); rootApp.config(function(lockProvider) { lockProvider.init({ clientID: 'xxxxx', domain: 'xxxx', auth:{ redirectUrl: window.location.origin + '/callback', responseType: 'token', params: { scope: 'openid profile' } }, options: { _idTokenVerification: true, configurationBaseUrl: 'https://cdn.auth0.com', theme:{ logo:'/logos/full_size/medium.png', primaryColor:'#C59D18' } } }); });
auth.service.js
node_modules\
答案 0 :(得分:1)
乍一看,您可能没有收到id_token
,因为您没有在app.js
中将responseType
指定为包含id_token
:
auth: {
...
responseType: 'token id_token',
...
}
给出一个尝试,您应该会很好!