React to identity changes
This commit is contained in:
parent
ddd69e5fdf
commit
6c13465dc2
|
|
@ -32,7 +32,7 @@ namespace MusicStore.Mocks.Facebook
|
|||
|
||||
internal static Task OnTicketReceived(TicketReceivedContext context)
|
||||
{
|
||||
if (context.Principal != null && context.Options.SignInScheme == new IdentityCookieOptions().ExternalCookieAuthenticationScheme)
|
||||
if (context.Principal != null && context.Options.SignInScheme == IdentityConstants.ExternalScheme)
|
||||
{
|
||||
//This way we will know all events were fired.
|
||||
var identity = context.Principal.Identities.First();
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace MusicStore.Mocks.Google
|
|||
|
||||
internal static Task OnTicketReceived(TicketReceivedContext context)
|
||||
{
|
||||
if (context.Principal != null && context.Options.SignInScheme == new IdentityCookieOptions().ExternalCookieAuthenticationScheme)
|
||||
if (context.Principal != null && context.Options.SignInScheme == IdentityConstants.ExternalScheme)
|
||||
{
|
||||
//This way we will know all events were fired.
|
||||
var identity = context.Principal.Identities.First();
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace MusicStore.Mocks.MicrosoftAccount
|
|||
|
||||
internal static Task OnTicketReceived(TicketReceivedContext context)
|
||||
{
|
||||
if (context.Principal != null && context.Options.SignInScheme == new IdentityCookieOptions().ExternalCookieAuthenticationScheme)
|
||||
if (context.Principal != null && context.Options.SignInScheme == IdentityConstants.ExternalScheme)
|
||||
{
|
||||
//This way we will know all events were fired.
|
||||
var identity = context.Principal.Identities.First();
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Authorization;
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace MusicStore.Mocks.Twitter
|
|||
|
||||
internal static Task OnTicketReceived(TicketReceivedContext context)
|
||||
{
|
||||
if (context.Principal != null && context.Options.SignInScheme == new IdentityCookieOptions().ExternalCookieAuthenticationScheme)
|
||||
if (context.Principal != null && context.Options.SignInScheme == IdentityConstants.ExternalScheme)
|
||||
{
|
||||
//This way we will know all Events were fired.
|
||||
var identity = context.Principal.Identities.First();
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.Security.Claims;
|
|||
using System.Security.Principal;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
|
|
|||
Loading…
Reference in New Issue