Skip to content

Commit

Permalink
feat(auth): add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyokone committed Jul 23, 2022
1 parent 417fb58 commit 2d42635
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Expand Up @@ -54,6 +54,8 @@ class PhoneMultiFactorGenerator {
}
}

/// Represents an assertion that the Firebase Authentication server
/// can use to authenticate a user as part of a multi-factor flow.
class MultiFactorAssertion {
final MultiFactorAssertionPlatform _delegate;

Expand All @@ -62,6 +64,8 @@ class MultiFactorAssertion {
}
}

/// Utility class that contains methods to resolve second factor
/// requirements on users that have opted into two-factor authentication.
class MultiFactorResolver {
final FirebaseAuth _auth;
final MultiFactorResolverPlatform _delegate;
Expand All @@ -87,6 +91,8 @@ class MultiFactorResolver {
}
}

/// MultiFactor exception related to Firebase Authentication. Check the error code
/// and message for more details.
class FirebaseAuthMultiFactorException extends FirebaseAuthException {
final FirebaseAuth _auth;
final FirebaseAuthMultiFactorExceptionPlatform _delegate;
Expand Down
Expand Up @@ -56,10 +56,12 @@ class MultiFactorSession {
final String id;
}

/// {@template .multiFactorAssertion}
/// Represents an assertion that the Firebase Authentication server
/// can use to authenticate a user as part of a multi-factor flow.
/// {@endtemplate}
class MultiFactorAssertionPlatform extends PlatformInterface {
/// {@macro .platformInterfaceMultiFactor}
/// {@macro .multiFactorAssertion}
MultiFactorAssertionPlatform() : super(token: _token);

static final Object _token = Object();
Expand All @@ -70,7 +72,7 @@ class MultiFactorAssertionPlatform extends PlatformInterface {
}
}

/// {@macro .platformInterfaceMultiFactorResolverPlatform}
/// {@template .platformInterfaceMultiFactorResolverPlatform}
/// Utility class that contains methods to resolve second factor
/// requirements on users that have opted into two-factor authentication.
/// {@endtemplate}
Expand Down

0 comments on commit 2d42635

Please sign in to comment.