Seamless login with AWS Cognito

  Kiến thức lập trình

We have a user dashboard built on AWS/Serverless stack that uses Cognito to manage user logins.

We’re integrating with a 3rd party app who want their users to be able to open our dashboard from theirs in a logged in state without the user needing to go through the login process manually – it should be seamless.

What they’ve described sounds like an OAUTH workflow, they want to do this:

  • Their app requests a long-lived token from ours using an API key
  • They then send us a request for a short-lived token using the long-lived token and the email address of a mutual user. If we recognize both, we send back the token to be used as a one-time login code.
  • They send the user to a redirection endpoint with the short-lived code. If the code is valid the user is logged in and goes to our dashboard, if not they get the login screen.

I’d appreciate any kind of help with this challenge, but mainly I’m after a bit of direction on how to get started. I’ve implemented OAUTH flows previously as a client, but not with Cognito and I don’t even know how to describe my question well enough to find a resource / tutorial.

Can anyone point me in the right direction, or perhaps point me at some docs that will have relevant content?

I appreciate the help!

I’ve tried googling and reading info about OAUTH and Cognito