# Build a Login Page with the Login API

Learn about the Login API and when you would use it.

> For the index of this section of the site, see [llms.txt](https://fusionauth.io/docs/llms.txt)

You can use the [login API](https://fusionauth.io/docs/apis/login.md) to build your own Login experiences. This is useful when the standard hosted login pages workflow does not work for you.

Examples of why this might be the case:

*   You are building a mobile application and do not want to use the system browser, however styled, to capture login information.
*   You have a single-page application (SPA) and don't want to redirect your users over to FusionAuth's login pages.
*   You need a login workflow that doesn't follow the standard FusionAuth workflow. For example, capturing a user's login identifier, followed by prompting them for additional profile information, then sending them a code, and finally asking for a password.
*   You have a SPA and a predefined set of components, so theming won't work.

## Using The Login API Directly

You can use the [Login API](https://fusionauth.io/docs/apis/login.md) to sign in your users directly. In this case, you will likely use one of the [FusionAuth client libraries](https://fusionauth.io/docs/sdks/index.md).

When a user signs in with this API, you receive the entire user object, as well as the JWT.

When you build on top of the Login API, you're responsible for building the user interface for all login use cases. This gives you more control, as well. You can still use other FusionAuth provided user interfaces for use cases such as the forgot password flow.

Using the Login API means that since your application will see sensitive user credentials, you'll need to ensure the application secures such data appropriately. This is in contrast with the OAuth grants, where only the identity provider has access to the credentials, and your application only sees tokens.

## Limitations

The [login API](https://fusionauth.io/docs/apis/login.md) does not accept the OAuth `scope` parameter as it is not part of an OAuth workflow. If your application requires the OAuth `scope` parameter to be present in the JWT, it can be added with the [JWT Populate](https://fusionauth.io/docs/lambdas/tokens/jwt-populate.md) lambda.

You're responsible for building the user interface to prompt users for consent to the requested scopes and capturing their response.

Related

[APIs Authenticate a User API API documentation for the FusionAuth Authenticate a User API. login api](https://fusionauth.io/docs/apis/login/authenticate.md)

[APIs Authenticate a User with a One Time Password API API documentation for the FusionAuth Authenticate a User with a One Time Password API. login api](https://fusionauth.io/docs/apis/login/authenticate-otp.md)

[APIs Complete Multi-Factor Authentication API API documentation for the FusionAuth Complete Multi-Factor Authentication API. login api](https://fusionauth.io/docs/apis/login/complete-mfa.md)

[APIs Export Login Records API API documentation for the FusionAuth Export Login Records API. login api](https://fusionauth.io/docs/apis/login/export.md)
---

## Other pages in Authentication

> For the full index of this section, see [Authentication](https://fusionauth.io/docs/llms-authentication.txt).

- [Application Authentication Tokens](https://fusionauth.io/docs/authentication/application-authentication-tokens.md): Leverage Application specific authentication tokens to speed up certain authentication tasks.
- [Authentication Types](https://fusionauth.io/docs/authentication/authentication-types.md): Learn about the supported types of authentication.
- [Login Page Cookies](https://fusionauth.io/docs/authentication/cookies.md): Learn about the cookies set by FusionAuth.
- [Add an Identity Provider (IdP)](https://fusionauth.io/docs/authentication/identity-providers.md): Learn how to let users log in through an external identity provider such as Google or Okta.
- [Multi-Factor Authentication (MFA)](https://fusionauth.io/docs/authentication/multi-factor-authentication.md): Learn about how to use multi-factor authentication (MFA) in FusionAuth as a developer.
- [OAuth](https://fusionauth.io/docs/authentication/oauth.md): Learn about the OAuth 2.0 and OpenID Connect grants FusionAuth supports for login and single sign-on.
- [One-Time Passwords](https://fusionauth.io/docs/authentication/one-time-passwords.md): Create a passwordless experience using magic links and one-time passwords.
- [Passkeys](https://fusionauth.io/docs/authentication/passkeys.md): Learn about passkeys, which let users log in with a device instead of a password.
