two_factor_finish
Complete a pending two-factor login after an EduPage sign-in requires 2FA, using a verification code or device approval polling.
Instructions
Finish a pending 2FA login. Writes: completes the pending auth flow.
Only needed after a login that returned two_factor_required: True.
Args:
code: Optional email/app verification code. When given it is used
directly; otherwise the device-confirmation flow is polled.
subdomain: School subdomain whose pending login to complete (defaults
to the active subdomain).
poll_seconds: How long (seconds) to wait for approval on a device when
code is not given. Defaults to 60; on timeout the caller can
call two_factor_finish again later.
Returns: dict: {'confirmed': True, 'logged_in': True, subdomain, user_id, role} on success, or a pending status when the confirmation wasn't approved within the poll window.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| subdomain | No | ||
| poll_seconds | No |