Background: I have a webpage (internal tool) that uses API which is secured with cognito. Current way of creating user in the Pool looks like this:
- User goes into webpage
- Logins using Google
- Cognito creates the user in the pool with External Provider - Google
- IT assigns user to proper groups = user can use webpage, depending on the groups he is assigned to.
Now, problem are the first 2 steps. In order for user to appear in pool he must first enter the webpage(after this user is automatically kicked out as he is not assigned to any group) & needs to wait for somebody to assign him to a group. I want to automate these steps so that users can enter the tool & have it available straight away.
Is there a way to create (using API) a user in the pool (with external identity provider), so that I can automatically create entry in Cognito + assign him to groups?
Because of the fact that company has GSuite, I have possibility to retrieve all necessary data both from cognito & google to create it. Does somebody have idea how to do so? I think I read through the boto3 docs & cognito docs & couldn't find any answer.