Multiple Cognito Providers #9581
Unanswered
NicoChaima72
asked this question in
Help
Replies: 1 comment
-
@NicoChaima72 , I see that your problem is that you are using the 'id' when calling the signIn function, but this function receives providers (and options). Therefore, you could use provider values like " I am trying to do the same, having two Cognito, but it seems it is not possible :/ I managed to connect two providers, but they have to be different. In my case, I used Cognito and a credentials provider. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
“Hello, I am trying to configure 2 cognito providers for the application, according to the documentation and forums, it would be enough to declare them and assign them a different id, but when I do that, the second provider gives me an error, if I assign a custom id to a provider, I always get that error, does anyone know how to configure it correctly?”
[...nextauth].ts adapter: PrismaAdapter(prisma), providers: [ CognitoProvider({ clientId: process.env.COGNITO_CLIENT_ID as string, clientSecret: process.env.COGNITO_CLIENT_SECRET as string, issuer: process.env.COGNITO_ISSUER as string, }), CognitoProvider({ clientId: process.env.COGNITO_CLIENT_ID_2 as string, clientSecret: process.env.COGNITO_CLIENT_SECRET_2 as string, issuer: process.env.COGNITO_ISSUER_1 as string, }), ]
page.tsx <Button variant="gradient" size="xl" gradient={{ from: "orange", to: "red" }} onClick={() => signIn("cognito")} > Iniciar sesión </Button> <Button variant="gradient" size="xl" gradient={{ from: "orange", to: "red" }} onClick={() => signIn("cognito2")} > Iniciar sesión 2 </Button>
Beta Was this translation helpful? Give feedback.
All reactions