Neophyte
Neophyte
CC#
Created by Neophyte on 3/5/2025 in #help
Federated Authentication flow - AWS Cognito as IDP - Microsoft Entra MultiTenant app
the solution I have chosen is 1. use MSAL to initiate the PKCE auth flow on the client side - https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/lib/msal-angular 2. I have used the redirect approach (it is a bit poorly documented on the webpage, but chatGPT could fill the gap). Popup flow was very much straight forward, but redirect was a bit off for my usecase. 3. I pass access token and idToken to the backend API. 4. Backend validates the accessToken with Microsoft 5. validate the aud of the idToken (to ensure that it match the clientId of my App registration in Entra) 6. if all valid, take the claims from the token (uid, iss, tid, etc.) and look it up from the internal identity storage and create/update with new info 7. Check status of user in Cognito and create/update with the new login data. 8. proceed with post-auth processing on the backend/client side.
8 replies
CC#
Created by Neophyte on 3/5/2025 in #help
Federated Authentication flow - AWS Cognito as IDP - Microsoft Entra MultiTenant app
just for the record, I have contacted AWS support and got confirmation that out-of-the-box multitenancy is not supported
8 replies
CC#
Created by Neophyte on 3/5/2025 in #help
Federated Authentication flow - AWS Cognito as IDP - Microsoft Entra MultiTenant app
thx, yeah I have posted it to AWS discord as well.
8 replies
CC#
Created by Neophyte on 3/5/2025 in #help
Federated Authentication flow - AWS Cognito as IDP - Microsoft Entra MultiTenant app
8 replies
CC#
Created by Neophyte on 3/5/2025 in #help
Federated Authentication flow - AWS Cognito as IDP - Microsoft Entra MultiTenant app
I ain't having a PLUS subscription in AWS Cognito, thus I can't see logs there. I failed to find relevant logs in Azure logs. 😦
8 replies
CC#
Created by Neophyte on 11/18/2024 in #help
How to to dynamically provide T type of a generic method
maybe this would reach the desired result with the least effort while not compromising too much on the standards
105 replies
CC#
Created by Neophyte on 11/18/2024 in #help
How to to dynamically provide T type of a generic method
that way the return type can be set in the interface without the need of a generic solution
105 replies
CC#
Created by Neophyte on 11/18/2024 in #help
How to to dynamically provide T type of a generic method
like serializing into a json, or stg. similar
105 replies
CC#
Created by Neophyte on 11/18/2024 in #help
How to to dynamically provide T type of a generic method
I am thinking on establishing an abstraction that will grant the errors are on a common structure.
105 replies
CC#
Created by Neophyte on 11/18/2024 in #help
How to to dynamically provide T type of a generic method
that's what I understood from above discussion
105 replies
CC#
Created by Neophyte on 11/18/2024 in #help
How to to dynamically provide T type of a generic method
the one calling IDataInterface.Validate<T, TError>(values) won't know compiletime the type of TError. Since he the specific implementation of IDataInterface is resolved only during runtime
105 replies
CC#
Created by Neophyte on 11/18/2024 in #help
How to to dynamically provide T type of a generic method
unless you abstract the errors to a common structure, disregarding the systemType
105 replies
CC#
Created by Neophyte on 11/18/2024 in #help
How to to dynamically provide T type of a generic method
yet this still wouldn't fix the generic return type problem. In above example you have used TError, but it is not in the method signature. So it must be a specific type
105 replies
CC#
Created by Neophyte on 11/18/2024 in #help
How to to dynamically provide T type of a generic method
maybe adding IParserFactory instead of the specific TParser could help. At the end, the parser will have to do the same. Parse<T>(Stream stream) no matter the implementation. This could reducde the number of generics needed. Same with TConverter
105 replies
CC#
Created by Neophyte on 11/18/2024 in #help
How to to dynamically provide T type of a generic method
it was an educative discussion, I appreciate it!
105 replies
CC#
Created by Neophyte on 11/18/2024 in #help
How to to dynamically provide T type of a generic method
ok, thanks!
105 replies
CC#
Created by Neophyte on 11/18/2024 in #help
How to to dynamically provide T type of a generic method
but I understand this cannot work
105 replies