> ## Documentation Index
> Fetch the complete documentation index at: https://intunedhq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# get_auth_session_parameters

```python theme={null}
from intuned_runtime import get_auth_session_parameters

async def get_auth_session_parameters() -> Any: ...
```

Returns the parameters used to create the current AuthSession. Use this to access credentials or configuration values that were provided when the AuthSession was created.

This function only works with Credentials-based AuthSessions. It allows your automation to access the original parameters (like usernames, API keys, or other identifiers) without hardcoding them.

**Returns**

Returns `Any` — The parameters object used to create the AuthSession.

**Raises**

* `Error` — Raised if the project doesn't use AuthSessions.
* `Error` — Raised if the AuthSession is Recorder-based (not Credentials-based).
* `Error` — Raised if the AuthSession is Runtime-based.

## Example: branching on a login flow

When a single site exposes more than one login flow (for example, separate provider and patient logins on the same portal), include a discriminator parameter when the AuthSession is created and read it back inside `check` to validate the correct post-login state.

```python auth-sessions/create.py theme={null}
from playwright.async_api import Page
from typing import Literal, TypedDict


class Params(TypedDict):
    loginType: Literal["provider", "patient"]
    username: str
    password: str


async def create(page: Page, params: Params | None = None, **_kwargs):
    await page.goto("https://portal.example.com/login")
    await page.get_by_placeholder("Username").fill(params["username"])
    await page.get_by_placeholder("Password").fill(params["password"])
    await page.get_by_role("button", name="Sign in").click()

    dashboard_path = (
        "/provider/dashboard"
        if params["loginType"] == "provider"
        else "/patient/home"
    )
    await page.wait_for_url(f"https://portal.example.com{dashboard_path}")
```

```python auth-sessions/check.py theme={null}
from playwright.async_api import Page
from intuned_runtime import get_auth_session_parameters


async def check(page: Page, **_kwargs) -> bool:
    params = await get_auth_session_parameters()

    path = (
        "/provider/dashboard"
        if params["loginType"] == "provider"
        else "/patient/home"
    )
    await page.goto(f"https://portal.example.com{path}")

    return "/login" not in page.url
```

When the AuthSession is created with `parameters.loginType: "provider"`, both `create` and `check` follow the provider flow; passing `"patient"` switches both to the patient flow.

## Related

* [AuthSessions](/main/02-features/auth-sessions) — Learn about authentication session management.
* [Multiple login flows on the same site](/main/02-features/auth-sessions#usage-patterns) — Usage pattern this example supports.
