When using a third-party OIDC auth provider, you are required to subclass `OIDCAuthProvider` and configure the API plugin with an instance of this class. The responsibility of the auth provider is to return the JWT token that was minted by your OIDC service. To do this:

* Create a class which extends `OIDCAuthProvider`

```dart
import 'package:amplify_api/amplify_api.dart';

class CustomOIDCProvider extends OIDCAuthProvider {
  const CustomOIDCProvider();

  @override
  Future<String?> getLatestAuthToken() async {
    ...
  }
}
```

* Register your instance of `APIAuthProvider` prior to calling `Amplify.configure()`:

```dart
Future<void> initialize() async {
  try {
    final datastorePlugin = AmplifyDataStore(
      modelProvider: ModelProvider.instance,
    );
    final api = AmplifyAPI(
      authProviders: const [
        CustomOIDCProvider(),
      ],
    );
    await Amplify.addPlugins([datastorePlugin, api]);
    await Amplify.configure(amplifyconfig);
  } on Exception catch (e) {
    print('Error configuring Amplify: $e');
  }
}
```
