1
0
forked from baron/baron-sso

SMS 인증 코드 발송 UI 및 백엔드 API 연동

This commit is contained in:
2026-01-06 15:01:02 +09:00
parent fec4a1cd55
commit cd0ca7a421
2 changed files with 63 additions and 71 deletions

View File

@@ -58,6 +58,22 @@ class AuthProxyService {
}
}
static Future<void> sendSms(String phoneNumber) async {
final url = Uri.parse('$_baseUrl/api/v1/auth/sms');
final response = await http.post(
url,
headers: {'Content-Type': 'application/json'},
body: jsonEncode({
'phoneNumber': phoneNumber,
}),
);
if (response.statusCode != 200) {
throw Exception('Failed to send SMS: ${response.body}');
}
}
static Future<void> logError(String message) async {
final url = Uri.parse('$_baseUrl/api/v1/client-log');
try {