Hi, we want to add Social Login plugin for Nop 4.6 to our website.
I have configured Google OAuth and I can login successfully. However I can't figure out how to detect if the current user has logged in through normal Username and Password or through Social Login.
Use case - only users that have logged in through Social Login are able to access a specific website section.
User logs in using Social Login (Google)
User tries to access a specific website section.
User is allowed access.
User logs in using Username and Password.
User tries to access a specific website section.
User is Forbidden to access it.
I am trying to implement a CustomAuthorizeAttribute that is able to check the current user's logged in method.
Can you guide me what to use for that?
The ExternalAuthentication cookie doesn't seem to be set. And I saw no Claim like ClaimTypes.AuthenticationMethod indicating the current login method used.
Thank you.
I have configured Google OAuth and I can login successfully. However I can't figure out how to detect if the current user has logged in through normal Username and Password or through Social Login.
Use case - only users that have logged in through Social Login are able to access a specific website section.
User logs in using Social Login (Google)
User tries to access a specific website section.
User is allowed access.
User logs in using Username and Password.
User tries to access a specific website section.
User is Forbidden to access it.
I am trying to implement a CustomAuthorizeAttribute that is able to check the current user's logged in method.
Can you guide me what to use for that?
The ExternalAuthentication cookie doesn't seem to be set. And I saw no Claim like ClaimTypes.AuthenticationMethod indicating the current login method used.
Thank you.