Authentication constructor

Authentication({
  1. AuthAdapter? adapter,
  2. List<LoggerAdapter> loggerAdapters = const [],
  3. List<AuthActionQuery> authActions = const [],
})

Authentication implemented by AuthAdapter.

register to register the user, and signIn to sign in.

Depending on the AuthProvider, it may be necessary to confirm the sign-in by doing confirmSignIn after executing signIn. You must also confirm your registration by verify.

If you restart the app after registering and signing in, please execute tryRestoreAuth when the app starts in order to re-authenticate.

You can reset your password by doing reset.

When changing authentication information, after reconfirming the authentication information with reauth (not necessary depending on the AuthProvider), the information can be changed with change. Then, depending on the AuthProvider, confirmChange must be executed to confirm the change.

You can sign out with signOut and delete authentication with delete.

It is possible to change the authentication platform used by specifying adapter.

You can log authentication events by specifying loggerAdapters.

AuthAdapterで実装された認証を行います。

registerでユーザーの登録を行ない、signInでサインインを行ないます。

AuthProviderによってはsignIn実行後、confirmSignInを行うことでサインインを確定する必要があります。 またverifyによって登録を確定させる必要があります。

登録、サインイン後にアプリを再起動した場合、再認証を行うためにアプリ起動時にtryRestoreAuthを実行してください。

resetを行うことでパスワードをリセットすることが可能です。

認証情報を変更する際、reauthで認証情報を再確認した後(AuthProviderによっては必要ありません)changeで情報を変更することが可能です。 その後、AuthProviderによってはconfirmChangeを実行して変更を確定させる必要があります。

signOutでサインアウトし、deleteで認証を削除することができます。

adapterを指定することで利用する認証プラットフォームを変更することが可能です。

loggerAdaptersを指定することによって認証イベントのログを取得することができます。

Implementation

Authentication({
  AuthAdapter? adapter,
  List<LoggerAdapter> loggerAdapters = const [],
  this.authActions = const [],
})  : _adapter = adapter,
      _loggerAdapters = loggerAdapters;