英文:
In next-auth how to avoid the extra step "Sign In With Cognito" and directly go to the sign-in form?
问题
在我的Next.js项目中,当我使用Cognito进行登录(使用next-auth库),我会首先看到一个按钮,上面写着“使用Cognito登录”。当点击该按钮时,登录表单会出现。我如何使Cognito不显示“使用Cognito登录”的第一步,而是直接跳转到登录页面?
我想跳过的步骤:
我想直接跳转到的步骤:
在Cognito的托管UI页面(AWS控制台中)中没有找到有用的信息。
英文:
In my Next.js project, when I use Cognito for sign-in (using the next-auth library), I get a first step of clicking a button that says "Sign in with Cognito". When that button is clicked, the sign-in form appears. How can I make cognito not show that first step of "Sign in with Cognito"? I need it to go straight to the Sign In.
The step I want to skip:
The step I want to go straight to:
Haven't found anything helpful in the Hosted UI page in Cognito (in the AWS console).
答案1
得分: 0
在你的组件中,当你调用signIn()函数来触发认证时,请改用signIn('cognito')。
英文:
In your components where you call signIn() function to trigger authentication, use signIn('cognito') instead.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论