Closed jojimcNova closed 6 months ago
Hey, @jojimcNova 👋. When you state that you're using a custom login page, is it a different URL than what is specified in your config (which is "http://localhost:3000/"
it looks like)?
Hi @cwomack, currently, I have the login page in the following url : http://localhost:3000/login
. I use a middleware to redirect to /login
if the user is not login. If he's authenticated, I redirect him to http://localhost:3000/
I finally got it, I had an issue with the callbacks. I setup everything to point http://localhost:3000/login
. Thank you for your support ! 😄
Before opening, please confirm:
JavaScript Framework
Next.js
Amplify APIs
Authentication
Amplify Version
v6
Amplify Categories
auth
Backend
None
Environment information
Describe the bug
I'm trying to provide 2 ways to my user to login : 1 - Credentials 2 - Using SAML identity providers with a user pool
When trying to login with the second option using
signInWithRedirect({ custom: custom-provider })
, I can see that the oauth2/authorize call is done in the network, and I also see the following call which ishttp://localhost:3000/?code=[Authorization_Code]&state=[State_Code]
Afterword, there is no connection done, not even cookies saved.
Expected behavior
The user to be authentified, so I can retrieve the user informations for my application.
Reproduction steps
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response