The following elements are keys of successful use-case modelling and can be directly derived from the UML 2.5.1 specifications (p639 and 640):
- A use-case specifies a set of behaviors offered by the subject (system), with an observable result that is of value for the actors, and without reference to the system's internal structure
- An actor is outside the subject (system).
If the QR code is generated by the same system, you MUST NOT have a System
actor: the system is not outside of itself. The QR code generation would just be part of the offered set of behaviors.
If the QR code is generated by another system, it depends:
if the other system is just an auxiliary one that is required by the internal structure of the system, but that is not relevant to the users, you SHOULD NOT show it as an actor;
if the other system is an independent system, and in particular if 1) it could be replaced by a human operator; or 2) its existence is relevant for the business stakeholders (e.g. a weather system, a stock quotation system, ...); or 3) your system helps that other system to achieve its goals; then you COULD show it as an actor (even SHOULD in the case 2).
More generally, there is some controversy around login use cases (detailed explanation of the opposing point of view : here). I'd advise not to use it. But if you, remove Verify
(this is an action performed by the system, and not something that is of value for the user), remove Bad password
(this is an event that will trigger some action, but definitivierly not something that the users avalue). Finally, if it's a password login, an SSO login or a MFA login does not matter: all tehrse are just means to achieve the goal. Let these kind of details for the description of the login scenario.
Keep also in mind that there is no sequencing between use-cases (this is one more reason why it's not a good idea to have a login use-case).