https://serverless-stack.com/ logo
#guide
Title
# guide
m

manitej

04/08/2022, 4:08 PM
Cognito + GitHub OAuth
s

Seth Geoghegan

04/08/2022, 4:14 PM
Awesome! when will this be available to check out?
g

Gabriel Araújo

04/08/2022, 4:21 PM
@manitej why not to use IAM here https://github.com/serverless-stack/serverless-stack/blob/google-oauth/examples/api-oauth-google/stacks/MyStack.js#L79 and you don't need to put this here: https://github.com/serverless-stack/serverless-stack/blob/google-oauth/examples/api-oauth-google/frontend/src/App.jsx#L29 you can just call the api and amplify will put the headers needed if there is a session..
Just an idea! But the example is pretty good!
m

manitej

04/08/2022, 4:25 PM
Thanks for the tip, tried with iam but got some issues with it while working with OIDC, JWT is solid in both cases (google & github)
c

Chris Crabtree

05/02/2022, 3:57 PM
Also, getting IAM auth to work in Postman authentication is no piece of cake. I almost had it automated using pre-request scripts that imported the AWK-SDK but the Postman Javascript sandbox does not support XMLHTTP requests that the AWS SDK requires. We ended up just using OAuth with Cognito User Pools to make things easier.