Description
Given email and a password, retrieve a JWT (json web token) that gives you access to restricted API endpoints.
If user enabled two-factor authorization, an attempt to login without two_factor_code set
(and given that email and password are correct) will return a response with empty token field
and two_factor_enabled field set to true
. Implying that you
should display additional UI and ask for two_factor_code. Once
you provide all three fields (email, password and two_factor_code) and they are valid, the API will return you a proper JWT.
See also: Authentication.
Topic: Auth
Arguments
data: UserLogin!
Main argument for mutations.
Data Argument Fields
Email of the user
Example: "no+spam@mail.com"
Valid when: email is not empty
Your device fingerprint (internal, temporary, used for debug purposes)
OAuth2 authorization code provided by the provider
oauth_provider: OAuth2Provider
OAuth2 provider used for registering this account (deprecated, use oauth_providers instead)
OAuth session id (for special implicit connection flow)
The user's password
Example: "34hb5kj3h45k3"
Timezone hint. Used as a hint when implicitly creating the user.
Example: "(GMT-05:00) Eastern Time"
Valid when: timezone_hint's length doesn't exceed 50 characters
It has to be set to true and signifies that you agree with Lana TOS
Example: true
Whether to mark device as trusted upon successful login
Example: true
Two factor auth verification code
Example: "545346"
JSON-encoded PublicKeyCredential
Session ID associated with webauthn login process
Result
Preview (typescript)
Loading module