IAuthService Interface

Summary

Registration and authentication
graph TD Type["IAuthService"] class Type type-node

Syntax

public interface IAuthService

Properties

Name Value Summary
CurrentUserId int?
Returns the current user ID. Null - if the session is not authenticated

Methods

Name Value Summary
LogoutAsync(CancellationToken) Task
Logout the current user
SendCodeAsync(string, CancellationToken) Task<ISentCode>
The first stage of authentication or registration. Request to send a verification code
SignInAsync(string, ISentCode, string, CancellationToken) Task<TUser>
The second stage of authentication. Send the received authentication code
SignUpAsync(string, ISentCode, string, string, string, CancellationToken) Task<TUser>
Register new user