Initiates the authorisation flow.
Optionaloptions: { Optionaluse= false - If true, and no active session exists, then the user will not be prompted to log in and the Promise will resolve with a null value.
OptionalanonymousIf provided, Passport internal metrics will be enriched with this value.
OptionaluseIf true, and no active session exists, then the user will not be prompted to log in. Instead, we will attempt to authenticate the user silently. This approach will fail if the user does not have an active session with the authentication server, or if user input is required (for example, consent is required).
the user profile if the user is logged in, otherwise null
Optionaloptions: { OptionalanonymousOptionaltimeoutMs: number
Deprecated
The method
loginwith an argument of{ useCachedSession: true }should be used in conjunction withconnectImxinstead.