Closed benshaji-sequoiaat closed 5 months ago
This issue is fixed for me:
http://localhost:8000/auth/complete/cognito/
and not http://127.0.0.1:8000/...
. Because, 127.0.0.1 and localhost are technically different when it comes to URI redirects. Use localhost.
Expected behaviour
I have AWS Cognito user pool with few users where i can login with email and password. Upon successful sign-in, it redirects to the url given as callback with Authorization code in url param
Actual behaviour
I've done setup on social-app-django as per docs, when i goto
http://localhost:8000/auth/login/cognito
, my Cognito hosted UI comes, but the url bar has url:https://myclientapp.auth.ap-south-1.amazoncognito.com/error?error=invalid_scope&client_id=3dkqled389888888888888tni5gtj7
. The request's reponse iserror: invalid_scope
I've below config added in Settings;Any logs, error output, etc?
No logs, backend logs while above happens;
Any other comments?
The Cognito is doing its job, because i did;
If above are done, we'll see the Cognito hosted UI sign-in page, once logged in will get redirected to postman id with tokens.
Okay, now that we know Cognito auth works, and no issues there, I've now changed callback url back to
http://localhost:8000/auth/complete/cognito/
again. Our error remains the same as "invalid_scope". In Cognito, scopes are email, openid.Final question/suggestion: What should i look into for troubleshooting, any recommended steps?
Thanks for reading Ben