Azure-Samples / active-directory-dotnet-webapp-webapi-multitenant-openidconnect

A sample .NET 4.5 MVC SaaS web app that signs-up and signs-in users from any Azure AD tenant, and calls the Azure AD Graph API.
66 stars 45 forks source link

Fixing an issue on EFADALTokenCache AfterAccessNotification #31

Closed luismanez closed 5 years ago

luismanez commented 7 years ago

As far as I've tested, the original code never updates an existing record, and always created a new item in the table, which can cause issues later when the Token is returned for a user (as it returns the First one, and could be already expired) I'm far from being an expert on EF, but just trying to fix the issue, as I've seen this code in a bunch of websites and samples.

acomsmpbot commented 7 years ago

No issues were found in this pull request.

luismanez commented 7 years ago

BTW, if this PR is accepted, that should fix issue #13 and maybe #20

kalyankrishna1 commented 5 years ago

@luismanez Please have a look at the added an updated token cache for Sql server PR

luismanez commented 5 years ago

hey @kalyankrishna1, thanks a lot. I'll give a try as soon as possible. Just a quick question, is this valid for MSAL? name says ADAL

kalyankrishna1 commented 5 years ago

Sorry Luis , MSAL one is till in the works. Had to wait on writing it because we introduced IToken cache in MSAL 3.0.0. In the meantime, polished the ADAL one..

luismanez commented 5 years ago

Thanks for clarifying @kalyankrishna1 This version looks fine to me. Haven´t had the chance to test it, but I think we can close the issue and see if anyone is still having issues with your version. Looking forward to have the MSAL one, as I´m super happy with changes in 3.0.

kalyankrishna1 commented 5 years ago

MSAL one is undergoing testing, I hope to debut it in the next 1-2 days with one of the MSAL samples