How to enable custom signup and signin behaviour in cognito

Viewed 220

I am using AWS Cognito for my authentication, and I have set up normal signup/signin and SAML signup/signin into my system.

Now I need a new way of authenticating user's in my system through an external system. It has to work like this:

  • To check if a user is allowed to signin/singup in my system, I will need to call an external endpoint (Another application's endpoint). And if it says the user is authenticated in their system, the user has to be able to sign up and sign in into my system.
  • And no the external system doesn't have an SSO setup that I could use to configure Cognito

I was initially planning to just sign up and sign in the users with admin access in cognito (after I get an ok response from the external endpoint) and generate the accessToken that way but I was not able to find this to be possible after looking at the Cognito docs.

Is there any way I could be able to make this authentication through external system work with they having an SSO setup?

1 Answers

That's possible but it would depend on:

  1. the user giving you a user identifier that they use at the external system
  2. the external system exposing an endpoint to your system i.e. most likely only when some sort of credential is issued to and used by your system

It other words: it would require a non-standard call that depends on an established relationship and agreement between the two systems, which is not really scalable and not likely to happen.

Redirecting the user via an SSO endpoint with a "silent" login - see e.g. https://auth0.com/docs/authorization/configure-silent-authentication - is another option that you may consider, which does not have the aforementioned disadvantages.

Related