Interface IFedCm
This domain allows interacting with the FedCM dialog.
[Experimental("BIDICDP001")]
public interface IFedCm
Properties
DialogClosed
Triggered when a dialog is closed, either by user action, JS abort, or a command below.
IEventSource<DialogClosedEventArgs> DialogClosed { get; }
Property Value
- IEventSource<DialogClosedEventArgs>
Remarks
Event args (DialogClosedEventArgs):
- DialogId
DialogShown
IEventSource<DialogShownEventArgs> DialogShown { get; }
Property Value
- IEventSource<DialogShownEventArgs>
Remarks
Event args (DialogShownEventArgs):
- DialogId
- DialogType
- Accounts
- Title - These exist primarily so that the caller can verify the RP context was used appropriately.
- Subtitle
Methods
ClickDialogButtonAsync(string, DialogButton, string?, CancellationToken)
Task<ClickDialogButtonResult> ClickDialogButtonAsync(string dialogId, DialogButton dialogButton, string? session = null, CancellationToken cancellationToken = default)
Parameters
dialogIdstringdialogButtonDialogButtonsessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<ClickDialogButtonResult>
A task representing the asynchronous operation, containing a ClickDialogButtonResult.
DisableAsync(string?, CancellationToken)
Task<DisableResult> DisableAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<DisableResult>
A task representing the asynchronous operation, containing a DisableResult.
DismissDialogAsync(string, bool?, string?, CancellationToken)
Task<DismissDialogResult> DismissDialogAsync(string dialogId, bool? triggerCooldown = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
dialogIdstringtriggerCooldownbool?sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<DismissDialogResult>
A task representing the asynchronous operation, containing a DismissDialogResult.
EnableAsync(bool?, string?, CancellationToken)
Task<EnableResult> EnableAsync(bool? disableRejectionDelay = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
disableRejectionDelaybool?Allows callers to disable the promise rejection delay that would normally happen, if this is unimportant to what's being tested. (step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in)
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<EnableResult>
A task representing the asynchronous operation, containing a EnableResult.
OpenUrlAsync(string, long, AccountUrlType, string?, CancellationToken)
Task<OpenUrlResult> OpenUrlAsync(string dialogId, long accountIndex, AccountUrlType accountUrlType, string? session = null, CancellationToken cancellationToken = default)
Parameters
dialogIdstringaccountIndexlongaccountUrlTypeAccountUrlTypesessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<OpenUrlResult>
A task representing the asynchronous operation, containing a OpenUrlResult.
ResetCooldownAsync(string?, CancellationToken)
Resets the cooldown time, if any, to allow the next FedCM call to show a dialog even if one was recently dismissed by the user.
Task<ResetCooldownResult> ResetCooldownAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<ResetCooldownResult>
A task representing the asynchronous operation, containing a ResetCooldownResult.
SelectAccountAsync(string, long, string?, CancellationToken)
Task<SelectAccountResult> SelectAccountAsync(string dialogId, long accountIndex, string? session = null, CancellationToken cancellationToken = default)
Parameters
dialogIdstringaccountIndexlongsessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<SelectAccountResult>
A task representing the asynchronous operation, containing a SelectAccountResult.