This project is read-only.

Issue when using this STS with Sharepoint 2013


I am facing a problem to make sharepoint 2013 works using this STS as a trusted identity provider, after selecting the custom STS on the sharepoint login page it redirectes me to the STS Login page, but after entering a correct user name and password, it redirected me to the sharepoint login page again, taking in concideration that I have added the STS certificate to the sharepoint trusted certificates and applied the below powershell command, any help will be highly appreciated.

$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("C:\cer\berrostscert.cer ")
New-SPTrustedRootAuthority -Name "STSTestCert" -Certificate $cert
$map = New-SPClaimTypeMapping -IncomingClaimType "" -IncomingClaimTypeDisplayName "EmailAddress" -SameAsIncoming
$map2 = New-SPClaimTypeMapping -IncomingClaimType "" -IncomingClaimTypeDisplayName "Role" -SameAsIncoming
$realm = " http://ibrahim_sp:8060/_trust/default.aspx"
$signin = " https://localhost:81/Login.aspx"
$ap = New-SPTrustedIdentityTokenIssuer -Name "CN=STSTestCert" -Description "SharePoint secured by ADFS SAML" -realm $realm -ImportTrustCertificate $cert -ClaimsMappings $map,$map2 -SignInUrl $signin -IdentifierClaim ""