# Sign in

Canonical page: https://docs.ovok.com/flutter-sdk/reference/ovok_flutter/sign-in

{/* Generated by scripts/generate_reference.dart; do not edit. */}

## SignIn [#signin]

```dart
class SignIn extends StatefulWidget
```

Signs in with a password or Google and handles second-factor challenges.

### Constructors [#constructors]

#### SignIn.new [#signinnew]

```dart
SignIn({
  required Ovok ovok,
  required ProfileType profileType,
  AuthTranslations translations = defaultAuthTranslations,
  String? googleInternalId,
  String? googleClientId,
  String? googleServerClientId,
  Future<void> Function(Session)? onSuccess,
  VoidCallback? onRegister,
  VoidCallback? onResetPassword,
  void Function(Object)? onError,
  Key? key,
})
```

Creates a sign-in form for [`profileType`](#signinprofiletype).

| Parameter | Type | Kind | Default |
| ------ | ------ | ------ | ------ |
| `ovok` | `Ovok` | required named |  |
| `profileType` | `ProfileType` | required named |  |
| `translations` | `AuthTranslations` | named | `defaultAuthTranslations` |
| `googleInternalId` | `String?` | named |  |
| `googleClientId` | `String?` | named |  |
| `googleServerClientId` | `String?` | named |  |
| `onSuccess` | `Future<void> Function(Session)?` | named |  |
| `onRegister` | `VoidCallback?` | named |  |
| `onResetPassword` | `VoidCallback?` | named |  |
| `onError` | `void Function(Object)?` | named |  |
| `key` | `Key?` | named |  |

### Properties [#properties]

#### SignIn.ovok [#signinovok]

```dart
final Ovok ovok
```

The client used for authentication requests.

#### SignIn.profileType [#signinprofiletype]

```dart
final ProfileType profileType
```

The account profile type to sign in as.

#### SignIn.translations [#signintranslations]

```dart
final AuthTranslations translations
```

Labels to use for this form.

#### SignIn.googleInternalId [#signingoogleinternalid]

```dart
final String? googleInternalId
```

Enables Google sign-in when set; used as the Ovok social-login identifier.

#### SignIn.googleClientId [#signingoogleclientid]

```dart
final String? googleClientId
```

Overrides the native Google client ID or web meta-tag value.

#### SignIn.googleServerClientId [#signingoogleserverclientid]

```dart
final String? googleServerClientId
```

The native server client ID used to request an ID token.

#### SignIn.onSuccess [#signinonsuccess]

```dart
final Future<void> Function(Session)? onSuccess
```

Called after the client stores a signed-in session.

#### SignIn.onRegister [#signinonregister]

```dart
final VoidCallback? onRegister
```

Called when the user chooses to register.

#### SignIn.onResetPassword [#signinonresetpassword]

```dart
final VoidCallback? onResetPassword
```

Called when the user chooses to reset their password.

#### SignIn.onError [#signinonerror]

```dart
final void Function(Object)? onError
```

Called when an authentication request fails.
