login method

Future<void> login(
  1. String token,
  2. U user
)

Logs in the user, setting the active token and user session.

Positional convenience alias for setSession.

Example:

await auth.login('access_token', loggedInUser);

Implementation

Future<void> login(String token, U user) =>
    setSession(user: user, token: token);