Login
This endpoint initiates the authentication process for a user. It supports multiple authentication methods including email, phone number, and third-party JWTs (Apple or Google).
POST /auth/login
Start a login for a user authority. The server will respond with the allowed authentication methods for the provided user.
Request
POST /auth/login
Headers:
{
"Host": "api.bringyour.com",
"Content-Type": "application/json"
}Body:
{
"user_auth": "user@example.com",
"auth_jwt_type": "google",
"auth_jwt": "eyJhbGciOi..."
}Fields
| Field | Type | Description |
|---|---|---|
user_auth | string | Optional. Email address or phone number. |
auth_jwt | string | Optional. The external authentication JWT (e.g., from Apple or Google). |
auth_jwt_type | string | Optional. Type of the JWT. One of: google, apple, un. |
wallet_auth | object | Optional. Wallet-based authentication parameters. |
Response
200 Success
Status: 200 OK
Content-Type: application/json
A successful response indicates the server recognized the user and provides instructions on how to proceed with the login flow.
{
"user_name": "John Doe",
"user_auth": "user@example.com",
"auth_allowed": ["password", "verify"],
"network": {
"by_jwt": "eyJhbGciOi..."
},
"error": null
}Fields
| Field | Type | Description |
|---|---|---|
user_name | string | The display name of the user. |
user_auth | string | The primary identifier used for authentication. |
auth_allowed | array | Methods the user can use to complete login (e.g., verify, password). |
network | object | Contains the network JWT if session initiation is complete. |
network.by_jwt | string | The JWT used for subsequent authorized network requests. |
error | object | Details on suggested actions if login cannot proceed directly. |
Example
HTTP Request
POST /auth/login HTTP/1.1
Host: api.bringyour.com
Content-Type: application/json
{
"user_auth": "support@ur.io"
}Successful HTTP Response
{
"user_name": "URnetwork Admin",
"user_auth": "support@ur.io",
"auth_allowed": ["password"]
}