为什么使用 auth0-Angular,它永远不会将我重定向到带有 screen_hint 标志的注册页面:signup?

问题描述 投票:0回答:2

我正在使用 Angular auth0-Angular 库并尝试加载注册页面,但它不会将我重定向到注册页面,它总是将我重定向到登录页面。

ngOnInit(): void {
console.log(‘toto’);
this.auth.loginWithRedirect({ screen_hint: ‘signup’});
}

我还在这里阅读了新的通用登录体验(https://auth0.com/docs/authenticate/login/auth0-universal-login/new-experience),其中说要放置标志 screen_hint: ‘signup’。 我正在使用新的通用页面,我什至还做了一个 console.log(config);查看参数是否设置正确,如附图所示,它已正确添加,但没有重定向到注册页面。

感谢您的帮助

有人有什么想法吗?

我尝试用authO-Angular搜索信息,但没有找到。我也做了一些测试,我也阅读了 authO 网站中的文档,但这对我没有帮助,它说要放置 screen_hint: 'signup',但不起作用,我不确定我是否要使用 auth0 构建我的应用程序,它花了很多时间来整合...

angular authentication auth0
2个回答
0
投票

如果这是在 v2 中,您需要使用 AuthorizationParams。将

screen_hint
添加到
authorizationParams
应该可以:

ngOnInit(): void {
console.log(‘toto’);
this.auth.loginWithRedirect({ 
authorizationParams: {
    screen_hint: 'signup',
  }});
}

0
投票

我已尝试使用上面的代码重定向到注册屏幕,但仍然不起作用。可以分享一下有效的代码吗

© www.soinside.com 2019 - 2024. All rights reserved.