> For the complete documentation index, see [llms.txt](https://docs.fortifiedid.se/access/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fortifiedid.se/access/key-components/authenticators/credential-validators/mobile-id/with-qr-or-app-switch.md).

# With QR or "app-switch"

This authenticator expects users either scan a QR code or "app-switch".

## Configuration

This is the configuration for the TaskViewAuthenticator

{% hint style="info" %}
**Authenticator type:** `TaskViewAuthenticator`
{% endhint %}

Common Authenticator configuration can be found [here](/access/key-components/authenticators/common-configuration.md).

{% tabs %}
{% tab title="Properties" %}

<table data-full-width="true"><thead><tr><th>Name</th><th>Description</th><th>Default value</th><th data-type="checkbox">Mandatory</th></tr></thead><tbody><tr><td><code>internal_http_destination</code></td><td>ID of the internal http client used to talk with backend.</td><td>"default"</td><td>false</td></tr><tr><td><code>username_parameter</code></td><td>Parameter to where the username is exported.</td><td><code>"username"</code></td><td>false</td></tr><tr><td><code>server_api_url</code></td><td>Address to the mobile server api module.</td><td>N/A</td><td>true</td></tr><tr><td><code>timeout_seconds</code></td><td>Time to live before the authenticator expires<br>(0 is forever)</td><td>0</td><td>false</td></tr><tr><td><code>task_form</code></td><td>The task-form to be used in the authentication.</td><td>N/A</td><td>true</td></tr><tr><td><code>webroot_dir</code></td><td>See common authenticator configuration</td><td>web/mobileid/taskviewauthenticator</td><td>false</td></tr></tbody></table>
{% endtab %}

{% tab title="Example" %}

```json
{
	"id": "myauth01",
	"type": "TaskViewAuthenticator",
	"config": 
	{
		"server_api_url":"http://<server_url>/mos",
		"context_path" : "/login/authn/login",
		"success_location": "http://<success_url>",
		"failure_location": "/login/authn/login/logout",
		"cancel_location": "/login/authn/login/logout",
		"task_form":
		{
	    		"elements":
    			[
	      			{"id":"1","type":"label","value":"Confirm your login"},
	      			{"id":"2","type":"button_confirm","value":"Confirm"},
	      			{"id":"3","type":"button_reject","value":"Reject"}
	    		]
		}
	}
}

```

{% endtab %}
{% endtabs %}

## Logging

Apart from system logging, event logging is done when starting, completing, and failing a transaction.

Event ids are:

* MOBILE\_ID\_100101("MobileID authentication started")
  * IDENTIFIER (session trace id)
* MOBILE\_ID\_100102("MobileID authentication completed")
  * IDENTIFIER (session trace id)
  * SOURCE\_USER\_NAME (user subject)
* MOBILE\_ID\_100103("MobileID authentication rejected")
  * IDENTIFIER (session trace id)
* MOBILE\_ID\_100104("MobileID authentication canceled")
  * IDENTIFIER (session trace id)
* MOBILE\_ID\_100105("MobileID authentication expired")
  * IDENTIFIER (session trace id)

## Data exposed to global state

After a user completes a transaction, the authenticator is marked as done. Data from the authentication response is then put into the global state, replacing existing values:

* "`username_parameter" set to user subject`


---

# 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.fortifiedid.se/access/key-components/authenticators/credential-validators/mobile-id/with-qr-or-app-switch.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.
