import 'package:appflowy_backend/protobuf/flowy-error/errors.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-user/auth.pb.dart'; import 'package:appflowy_backend/protobuf/flowy-user/user_profile.pbserver.dart'; import 'package:dartz/dartz.dart'; class AuthServiceMapKeys { const AuthServiceMapKeys._(); // for supabase auth use only. static const String uuid = 'uuid'; static const String email = 'email'; } abstract class AuthService { /// Returns [UserProfilePB] if the user is authenticated, otherwise returns [FlowyError]. Future> signIn({ required String email, required String password, AuthTypePB authType, Map map, }); /// Returns [UserProfilePB] if the user is authenticated, otherwise returns [FlowyError]. Future> signUp({ required String name, required String email, required String password, AuthTypePB authType, Map map, }); /// Future> signUpWithOAuth({ required String platform, AuthTypePB authType, Map map, }); /// Returns a default [UserProfilePB] Future> signUpAsGuest({ AuthTypePB authType, Map map, }); /// Future signOut(); /// Returns [UserProfilePB] if the user has sign in, otherwise returns null. Future> getUser(); }