createToken abstract method
Creates a new authentication token for the specified user with the given authentication method and optional scopes.
When scopes is null, the token should carry the auth user's current
scopes. Custom issuer implementations should follow the same contract:
account-creation callbacks may change a user's scopes after creation,
so on signup the token must reflect the scopes resolved at issuance
time rather than scopes captured earlier.
Unlike issueToken this performs no sign-in policy check and no cookie delivery; the returned AuthSuccess always carries the secrets.
Implementation
Future<AuthSuccess> createToken(
Session session, {
required UuidValue authUserId,
required String method,
Set<Scope>? scopes,
Transaction? transaction,
});