login

abstract suspend fun login(credentials: Credentials): User

Log in as a user with the given credentials associated with an authentication provider.

Return

the logged in User.

Parameters

credentials

the credentials representing the type of login.

Throws

if the provided credentials were not correct. Note, only AuthenticationProvider.EMAIL_PASSWORD, AuthenticationProvider.API_KEY and AuthenticationProvider.JWT can throw this exception. Other authentication providers throw an AuthException instead.

if a problem occurred when logging in. See the exception message for further details.

for other failures that can happen when communicating with App Services. See AppException for details.