switchTo method

Future<void> switchTo(
  1. LoginProfile profile
)

Switches to profile. The engine disconnects from the current tailnet and connects with the target profile's credentials.

Prefer this over switchToId — passing a LoginProfile you got from list catches stale IDs at the type level.

Implementation

Future<void> switchTo(LoginProfile profile) => switchToId(profile.id);