I have system composed of a mobile app and a backend (Django), the current auth workflow:
- Mobile App signs in and receives a JWT using my authentication service
- Mobile App sends JWT to REST API with every request
Now I want to allow mobile app to access aws resources (s3..etc) directly instead of going through the backend, so the desired workflow is:
But instead of using amazon as the idP (as the image above) I want to create my own idP, and my questions are:
- Is the JWT token from the current auth workflow becomes the identity-token or the access-token of the openid connect authorization code workflow?
- How Cognito verify that the identity-token is issued from the same idP that is configured with (step 3)?
- Or I Should separate the normal user authentication (current auth wokflow) from aws credentials auth workflow? how?