guleifanger

POC Cognito - Natura

May 26th, 2020
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. API Platform
  2. client_id: 0abf3607-db34-310f-8ab3-31fab087d817
  3. client_secret: 00198fd8-0a1c-3686-a064-3385a95f9e3e
  4.  
  5. https://dev.apigw.natura.com.br/poc-cognito/v1
  6.  
  7.  
  8. Cognito
  9. URL de Login: https://app01.auth.us-east-1.amazoncognito.com/login?client_id=5bgq4636p5bsi0f4bb4l6c5lnj&response_type=code&scope=aws.cognito.signin.user.admin+email+http://app01.poc.com.br/read+http://app01.poc.com.br/write+openid+profile&redirect_uri=https://dev.apigw.natura.com.br/poc-cognito/v1/signin
  10.  
  11. usuario: flavio.pimenta@gmail.com
  12. senha: Sensedia@2020
  13.  
  14. You shouldn't set the 'redirect_uri' to Cognito's Login Endpoint. It makes no sense. The 'redirect_uri' is a parameter to tell Cognito where to take the user after login, which would be your application's url.
  15.  
  16. The 'redirect_uri' should be exactly match of one of the Callback URIs for the app client you configured for security reasons, otherwise you will get a' redirect_mismatch' error.
  17.  
  18. To access the login endpoint:
  19.  
  20. https://mydomain.auth.us-east-1.amazoncognito.com/login?response_type=code&client_id=CLIENT_ID&redirect_uri=REDIRECT_URI
  21. For the authorize endpoint:
  22.  
  23. https://mydomain.auth.us-east-1.amazoncognito.com/oauth2/authorize?response_type=code&client_id=CLIENT_ID&redirect_uri=REDIRECT_URI
  24. The authorize endpoint firsts checks to see if you have a session cookie indicating that you're already logged in, and if you are, it automatically redirects you to the redirect_uri, otherwise it will take you to the login page via the Login Endpoint with the query strings provided to the authorize endpoint.
Add Comment
Please, Sign In to add comment