---
title: "Authenticate user and generate tokens"
method: GET
path: "/v1/authentication/authenticate"
tags: ["Authentication Controller"]
---

# Authenticate user and generate tokens

`GET /v1/authentication/authenticate`

Initiates the authentication flow by redirecting to Keycloak login page if no session exists. After successful login, generates a new JWT token and stores it in the database. Redirects to the specified endpoint with a code for token retrieval.

## Query parameters

- `redirect_uri` string, required
- `redirect_host` string, required
- `device_token` string, required
- `platform_type` string

## Other responses

- `302` — Redirect to Keycloak login or specified endpoint
- `400` — Invalid redirect host or parameters
- `401` — Authentication failed
- `500` — Internal server error

---

[API](https://skmtc.dev/floik/apis/floik-authentication-server.md) · [All operations](https://skmtc.dev/floik/apis/floik-authentication-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/floik/floik-authentication-server/revisions/2b2a5dad2f5e/schema)
