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

# getMethods

> Get the sign-in methods enabled for the configured auth environment.

## Function Signature

```dart theme={null}
Future<PortalAuthMethods> getMethods()
```

## Description

A [`PortalAuth`](./portalauth) method. Reports the sign-in methods your environment allows, so you can render only the buttons that will work, and whether it expects your app to create a wallet. Side-effect free and safe to retry.

A two-factor requirement is not reported here; it only appears when [`handleRedirect`](./portalauthhandleredirect) returns `PortalTotpRequired`.

Available starting from `portal_flutter` 2.0.0.

## Parameters

This method takes no parameters.

## Returns

**`PortalAuthMethods`** - An object containing:

| Property | Type | Description |
| - | - | - |
| `allowedAuthMethods` | `List<PortalAuthMethod>` | `emailMagicLink`, `google` and/or `apple`. Methods this SDK version doesn't recognize are dropped. |
| `autoCreateWallet` | `bool` | Whether the environment expects the app to create a wallet after sign-in. A hint only: neither the backend nor the SDK creates one. |

## Example

```dart theme={null}
import 'package:portal_flutter/portal_flutter.dart';

final methods = await PortalAuth().getMethods();

final showGoogle = methods.allowedAuthMethods.contains(PortalAuthMethod.google);
final showEmail = methods.allowedAuthMethods.contains(PortalAuthMethod.emailMagicLink);
```

## Errors

| Code | Description |
| - | - |
| `AUTH_NOT_CONFIGURED` | Called before [`configure`](./portalauthconfigure) |
| `AUTH_GET_METHODS_ERROR` | A network or server error |

## Related

* [Check which methods are enabled guide](../guide/client-auth#check-which-methods-are-enabled)
* [Create or reuse the wallet](../guide/client-auth#create-or-reuse-the-wallet)
* [PortalAuth](./portalauth)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.