# Login Authentication

Login authentication for blockchain-based games can be cumbersome. To solve this, we've collaborated with **@Gekctek**, the creator of ICP.NET, and **@filharvey.icp**. Together, we devised solutions for Unity ICP login authentication across multiple platforms: WebGL, iOS, Android, Windows, and Mac.

In order for Login Authentication to work, Unity communicates with a webpage that handles the NFID login. The Unity Template uses a default BOOM login webpage, but you can deploy your own login webpage with our [code on github](https://github.com/BoomDAO/examples/tree/main/login-webpage) if you'd like.

For WebGL, Unity uses custom HTML that displays an iframe of the login webpage to manage the login flow, securely transferring the identity delegation back to the Unity client. You can see this HTML template in the **Assets/WebGLTemplates/BoomTemplate** folder in the [Unity Template project](https://github.com/BoomDAO/unity-template).

On all other platforms, we utilize local websockets to ensure secure transmission of the identity delegation from the login webpage to the Unity client.

All these login flows are supported in the Unity Template.


---

# Agent Instructions: 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:

```
GET https://docs.boomdao.xyz/unity-package/login-authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
