I have a test application developed for my collage project. with below table structure
tbl_UserMaster (userid int, username string, password string)
where I made users to authenticate with username and password. And use application features.
Now, Our teacher assigned us task to authenticate using
MicrosoftAccount and Facebook
After much search and refer to various sources I am able to integrate both the login using asp.net core's AddAuthentication(options)
Now, we are given a new task to create a page that will associate SSO logins and database users. So, it would be upto user to login with SSO or Username and password.
And here I got stuck on how to associate both of them. I have created table as below
tbl_UserMasterSSO (ssoID int, ProviderName string, NameIdentifier string, userid int(fk_tbl_UserMaster))
But, I don't have idea about how to, when user is already login with cookies then how to make them login with external provider and get NameIdentifier and associate with tbl_UserMaster's userid.
Requesting Experts to suggest an article or solution from where I can integrate the sample code to finish the task assigned.