Skip to main content

IAuthenticationProvider

Defines a contract for authentication-related services in the m00m ecosystem. Handles user sign-in, sign-out, and account management flows.

public interface IAuthenticationProvider : IOrchestratorService

Responsibilities

  • Authenticate users via anonymous or email/password methods
  • Manage session state and track current user
  • Trigger status callbacks on auth changes
  • Provide environmental context for orchestrator logic

Members

User GetCurrentUser()

Returns the currently authenticated user, or null if not logged in.

Task<User> SignInAnonymously(string displayName)

Signs in using a guest profile with a specified display name.

Task<User> SignInWithEmail(string email, string password)

Authenticates with standard credentials.

Task<User> CreateAccount(string email, string password, string displayName)

Creates a new user profile with credentials and metadata.

Task<bool> SignOut()

Terminates the current session.

Action OnUserStatusChanged

Callback triggered when the user status changes (sign in/out, token refresh, etc).

GameEnvironment GameEnvironment { get; set; }

Defines which environment (dev/beta/prod) this provider operates under.


Implements the shared IOrchestratorService base for orchestration alignment.