CDPotion.Domain.FedCm (cdpotion v0.1.1)

Summary

Types

Corresponds to IdentityRequestAccount

Whether the dialog shown is an account chooser or an auto re-authentication dialog.

Whether this is a sign-up or sign-in action for this account, i.e. whether this account has ever been used to sign in to this RP before.

Functions

Parameters:

  • dialogId:string: description not provided :(
  • triggerCooldown:boolean: (Optional) description not provided :(

Parameters:

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.

Parameters:

  • dialogId:string: description not provided :(
  • accountIndex:integer: description not provided :(

Types

@type account() :: %{
  accountId: String.t(),
  email: String.t(),
  givenName: String.t(),
  idpConfigUrl: String.t(),
  idpSigninUrl: String.t(),
  loginState: login_state(),
  name: String.t(),
  pictureUrl: String.t(),
  privacyPolicyUrl: String.t() | nil,
  termsOfServiceUrl: String.t() | nil
}

Corresponds to IdentityRequestAccount

Link to this type

dialog_type()

@type dialog_type() :: :AccountChooser | :AutoReauthn

Whether the dialog shown is an account chooser or an auto re-authentication dialog.

Link to this type

login_state()

@type login_state() :: :SignIn | :SignUp

Whether this is a sign-up or sign-in action for this account, i.e. whether this account has ever been used to sign in to this RP before.

Functions

Link to this function

dismiss_dialog(dialog_id, trigger_cooldown \\ nil)

Parameters:

  • dialogId:string: description not provided :(
  • triggerCooldown:boolean: (Optional) description not provided :(
Link to this function

enable(disable_rejection_delay \\ nil)

Parameters:

Link to this function

reset_cooldown()

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.

Link to this function

select_account(dialog_id, account_index)

Parameters:

  • dialogId:string: description not provided :(
  • accountIndex:integer: description not provided :(