Class IdentityProvider
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalIdentityProvider interface of the Federated Credential Management (FedCM) API represents an Identity provider and provides access to related information and functionality.
[Value("IdentityProvider")]
public class IdentityProvider
- Inheritance
-
IdentityProvider
- Inherited Members
Remarks
-Federated Credential Management API on privacysandbox.google.com (2023)
Constructors
IdentityProvider()
public IdentityProvider()
Methods
Close()
NOTE
Experimentalclose() static method of the IdentityProvider interface provides a manual signal to the browser that an {{glossary("Identity provider", "IdP")}} sign-in flow is finished.
[Value("close")]
public static GlobalObject.Undefined Close()
Returns
- GlobalObject.Undefined
undefined.
Remarks
close() needs to be called from the same origin as the specified IdP's sign-in dialog, as defined in the IdP config.
close() is used to close the IdP sign-in dialog when sign-in is completely finished and the IdP has finished collecting data from the user. A primary use case for close() is closing the IdP sign-in dialog in cases where the browser and the IdP login status become out of sync, and the browser initiates a dynamic sign-in flow to correct the issue.
-Federated Credential Management API on privacysandbox.google.com (2023)
GetUserInfo(IdentityProviderConfig)
NOTE
ExperimentalgetUserInfo() static method of the IdentityProvider interface returns information about a user that has signed in, which can be used to provide a personalized welcome message and sign-in button. This method has to be called from within an {{glossary("Identity provider", "IdP")}} origin {{htmlelement("iframe")}} so that {{glossary("Relying party", "relying party")}} (RP) scripts cannot access the data. This must occur after a user has been signed in to a RP site.
[Value("getUserInfo")]
public static Task<List<IdentityUserInfo>> GetUserInfo(IdentityProviderConfig config)
Parameters
configIdentityProviderConfig
Returns
- Task<List<IdentityUserInfo>>
A Promise that fulfills with an array of objects, each containing information representing a separate user account. Each object contains the following properties:
Remarks
This pattern is already common on sites that use identity federation for sign-in, but getUserInfo() provides a way to achieve it without relying on third-party cookies.
-Federated Credential Management API on privacysandbox.google.com (2023)
Resolve(string, IdentityResolveOptions)
[Value("resolve")]
public static GlobalObject.Undefined Resolve(string token, IdentityResolveOptions options = null)
Parameters
tokenstringoptionsIdentityResolveOptions