You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifically, how to get users into Amplify (current idea is table User in Amplify with trigger in Congito which adds them to the table), how to get them to the front-end (via GraphQL)
The text was updated successfully, but these errors were encountered:
Here's a step by step explanation of how this would work:
User logs in, Cognito handles authentication with Warwick.
Once logged in, the user is redirected to warwick.ai.
On redirection, the client will send a GraphQL mutation to create a new User item. The User model ensures that the user is actually logged in and will check they have a valid session using @auth. The logged-in user will have their id stored as the id in the User item, therefore subsequent login will not duplicate the item, just update it.
After some more research, I think we are better of just having a lambda function that will add a row to our DB (model called something like UserProfile) that will trigger on the Cognito after authentication/confirmation. This lambda function should also check if the user profile already exists first to avoid creating duplicates or removing old rows.
The UserProfile should store anything that we want to use in the platform e.g.:
Specifically, how to get users into Amplify (current idea is table User in Amplify with trigger in Congito which adds them to the table), how to get them to the front-end (via GraphQL)
The text was updated successfully, but these errors were encountered: