Forum Discussion

nullp0inter's avatar
3 years ago

How to create security definitions for Cognito

I am very new to Swagger, and I have an API I've built in Go. I am adding annotations to the code to generate Swagger docs, however I am stumbling on the security definitions because I am using Cognito as my auth solution with an access code grant. I do not have a client secret.


My authorize url is:**********&redirect_uri=http://localhost&response_type=code&scope=openid+profile+email+aws.cognito.signin.user.admin&code_challenge_method=S256&code_challenge=******&state=*******


In every example I've seen online, no one lists the additional parameters required for the authorize url. Why is that? And how would this even work once I create the Swagger doc?


I keep thinking that I should just make my own authorize link that forwards to the correct location(and generates the code challenge and state values), but that seems wrong?


So what is the recommended way of setting this up?

No RepliesBe the first to reply