我正在从Auth0的v7迁移到v9,我没有使用旧版本的redirectUri。
我有这个登录代码:
const auth0 = new Auth0({
clientID: CLIENT_ID,
domain: CLIENT_DOMAIN,
responseType: 'token'
});
withPromise(auth0.login.bind(auth0), {
connection: 'db',
sso: false,
responseType: 'token'
username: authCreds.email.trim(),
password: authCreds.password.trim()
});
我将其重写为:
const webAuth = new Auth0.WebAuth({
clientID: CLIENT_ID,
domain: CLIENT_DOMAIN,
responseType: 'token id_token',
redirectUri: ''
});
withPromise(webAuth.login.bind(webAuth), {
realm: 'db',
username: authCreds.email.trim(),
password: authCreds.password.trim(),
sso: false,
redirect: false
});
但现在登录后,它会重定向到https://include-staging.auth0.com/authorize?client_id= ...
有错误:
Oops!, something went wrong
server_error: Unable to issue redirect for OAuth 2.0 transaction
我不需要使用回调