> For the complete documentation index, see [llms.txt](https://docs.mosip.io/1.2.0/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mosip.io/1.2.0/~/changes/EDXkAXJ2BnUpKbwo76Y3/modules/id-authentication-services.md).

# ID Authentication Services

## Overview

ID Authentication is built as an independent service that can be seeded with data for authentication by any system, including MOSIP. In the current design, we can have multiple IDA modules running from a single issuer.

The ID Authentication (IDA) module of MOSIP consists of the following services:

1. Authentication Services
2. OTP Service
3. Internal Services

## Authentication Services

The services mentioned below are used by Authentication or e-KYC Partners.

* Authentication Service: used to authenticate an individual's UIN/VID using one or more authentication types.
* KYC Authentication Service: used to request e-KYC for an individual's UIN/VID using one or more authentication types.

![](https://1836199994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4EyCrLbFom7vj7UcMIUZ%2Fuploads%2Fgit-blob-b243c487c2d815f8c0e1285dc369be215ad207b4%2Fauthentication-flow.png?alt=media)

## OTP Request Service

OTP Request Service is used by Authentication/e-KYC Partners to generate OTP for an individual's UIN/VID. The generated OTP is stored in IDA DB for validation during OTP Authentication.

![](https://1836199994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4EyCrLbFom7vj7UcMIUZ%2Fuploads%2Fgit-blob-da866878d3a2fc1a511a5cf9f7e475ca780bd5c5%2Fotp-request-flow.png?alt=media)

## Internal Services

1. Internal Authentication Service - The authentication service used by internal MOSIP modules such as Resident Service, Registration Processor and Registration Client to authenticate individuals.
2. Internal OTP Service - used by Resident Service to generate OTP for an Individual for performing OTP Authentication.
3. Authentication Transaction History Service - used by Resident Service to retrieve a paginated list of authentication and OTP Request transactions for an individual.

### Credential issuance callback

* [ID Authentication](/1.2.0/~/changes/EDXkAXJ2BnUpKbwo76Y3/id-authentication.md) uses the credential data of the individuals for performing authentication.
* This credential is requested by [ID Repository](/1.2.0/~/changes/EDXkAXJ2BnUpKbwo76Y3/modules/id-repository.md) upon any UIN insertion/update or VID creation.
* The credential is created by Credential Service uploaded to [Datashare](/1.2.0/~/changes/EDXkAXJ2BnUpKbwo76Y3/modules/datashare.md) service and the Datashare URL is sent to ID-Authentication using [WebSub](/1.2.0/~/changes/EDXkAXJ2BnUpKbwo76Y3/modules/websub.md) message.
* WebSub invokes the credential-issuance callback in [ID Authentication](/1.2.0/~/changes/EDXkAXJ2BnUpKbwo76Y3/id-authentication.md) where the credential data is downloaded from Datashare and then stored in IDA DB.

![](https://1836199994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4EyCrLbFom7vj7UcMIUZ%2Fuploads%2Fgit-blob-c4eca02e01621215e4f15449e62149ba87c0f707%2Fida-credential-flow.png?alt=media\&token=84db0c8a-da47-49b7-89f9-0d9343cbb902)

## Key generation

ID Authentication needs the below [keys](/1.2.0/~/changes/EDXkAXJ2BnUpKbwo76Y3/modules/keymanager/keys.md) to be generated during the deployment for usage in Authentication Service.

1. `IDA IDENTITY_CACHE`(K18) symmetric key to encrypt and decrypt the Zero-knowledge 10K random keys
2. `IDA ROOT` master key(K15)), `IDA module` master key(K16), `IDA-SIGN` master key
3. Base keys `CRED_SERVICE`(K22), `IDA-FIR`(K21), `INTERNAL`(K19), `PARTNER`(K20)

## Authentication client demo app

This is a reference application to demonstrate how authentication and KYC can be performed by [Authentication Partners](/1.2.0/~/changes/EDXkAXJ2BnUpKbwo76Y3/partners.md#partner-types).

Refer to the [repository](https://github.com/mosip/authentication-demo-ui/tree/release-1.2.0) for more details.

Below is the sample authentication demo UI image.

![](https://1836199994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F4EyCrLbFom7vj7UcMIUZ%2Fuploads%2Fgit-blob-bda14acd58813774a09513643313f415b0c4e9eb%2Fsample-auth-demo-ui.png?alt=media\&token=6a5a6ee2-0103-486b-94ff-27a3ac5c18e0)

## Configuration

Refer to [ID Authentication Configuration Guide](https://github.com/mosip/id-authentication/blob/release-1.2.0/docs/configuration.md).

## Developer Guide

To know more about the developer setups, read:

1. [ID Authentication Service Developers Guide](https://docs.mosip.io/1.2.0/modules/id-authentication-services/id-authentication-service-developer-guide)
2. [ID Authentication OTP Service Developers Guide](https://docs.mosip.io/1.2.0/modules/id-authentication-services/id-authentication-otp-service-developer-guide)
3. [ID Authentication Internal Service Developers Guide](https://docs.mosip.io/1.2.0/modules/id-authentication-services/id-authentication-internal-service-developer-guide)

## API

Refer [API Documentation](https://mosip.github.io/documentation/1.2.0/1.2.0.html).

## Source code

[Github repo](https://github.com/mosip/id-authentication/tree/release-1.2.0).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mosip.io/1.2.0/~/changes/EDXkAXJ2BnUpKbwo76Y3/modules/id-authentication-services.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
